This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Allow docs to match examples from #39
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
module.exports = { | ||
ROOT_GITHUB: 'https://github.com/zapier/zapier-platform-schema', | ||
DOCS_PATH: 'docs/build/schema.md' | ||
DOCS_PATH: 'docs/build/schema.md', | ||
SKIP_KEY: '_skipTest', | ||
// the following pairs of keys can't be used together in FieldSchema | ||
// they're stored here because they're used in a few places | ||
INCOMPATIBLE_FIELD_SCHEMA_KEYS: [ | ||
['children', 'list'], // This is actually a Feature Request (https://github.com/zapier/zapier-platform-cli/issues/115) | ||
['children', 'dict'], // dict is ignored | ||
['children', 'type'], // type is ignored | ||
['children', 'placeholder'], // placeholder is ignored | ||
['children', 'helpText'], // helpText is ignored | ||
['children', 'default'], // default is ignored | ||
['dict', 'list'], // Use only one or the other | ||
['dynamic', 'dict'], // dict is ignored | ||
['dynamic', 'choices'] // choices are ignored | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exclusive fields are only for
FieldSchema
, correct? Putting them here inconstants.js
is a bit confusing. Without looking at the other modules, it's not easy to tell what it is for only by the name ofMUTUALLY_EXCLUSIVE_FIELDS
. I suggest keepingincompatibleFields
inmutuallyExclusiveFields.js
and import it inFieldSchema.js
. If that creates a circular import, maybe we can do the opposite, i.e., initializeincompatibleFields
inFieldSchema.js
and import it inmutuallyExclusiveFields.js
. Does that make sense?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, yeah. The main issue is that the checks and schemas are each expected to export a single check/schema. We can export more things, but that requires code changes wherever schemas are imported (which is a more involved change). To that end, it would make sense to have it in its own common file, which is basically
constants
. I'll tweak the name and add comments to make it more clear why it's there though.