-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): exports json schema #2362
Conversation
action.name, | ||
providerConfigKey, | ||
'./' | ||
); |
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.
check now done by loadScriptFiles
@khaliqgant happy to get your review on this change |
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.
Issue with removed line in the deploy process.
Looks great otherwise!
Notice that
date_created: date
date_last_modified: date
produces
"date_created": {
"type": "string",
"format": "date-time"
},
"date_last_modified": {
"type": "string",
"format": "date-time"
}
which is most accurate but I have been putting
date_created: string
date_last_modified: string
because they are in fact strings and I find it confusing otherwise, but curious on your thoughts in line of this json schema output?
I'm fine with this. I personally think it was a not a good idea to support date, because it is not json portable and JS Date default output is not ISO, but we decided to support it so the json schema is only reflecting that. |
Describe your changes
Fixes https://linear.app/nango/issue/NAN-1154/produce-json-schema-locally
Fixes https://linear.app/nango/issue/NAN-1155/upload-json-schema-when-deploying
Output
schema.ts
andschema.json
in.nango/
folderWe decided to not output additional stuff at the root level to avoid cluttering the main folder. Customers can choose what they to commit. And we will add more output in the coming weeks/months (most likely zod, then others languages maybe)
Rename
load
toloadValidateParse
For clarification because it wasn't super obvious it could fail with validation error.
Touch a bit deploy.service to prepare new files to be sent but the logic is the same as before (not yet sending json)