-
Notifications
You must be signed in to change notification settings - Fork 7
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
Eirby/client side schema validation #337
Conversation
EdwardIrby
commented
Aug 30, 2023
- Adds schema validation into editor
- Fixes tabbing bug that was blocking dev on this
- needs styling adjustment on tab container to show top tool tip.
Screen.Recording.2023-08-29.at.5.42.10.PM.mov |
Screen.Recording.2023-08-29.at.5.54.24.PM.mov |
580dbaf
to
eea57e8
Compare
The schema validation is so cool, thanks @EdwardIrby . |
if (modules.length) { | ||
const ids = id.split('.') | ||
// Handle edge case where the id contains and invalid module or verb | ||
if (modules.length) { |
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.
There should be a check for ids.length == 2
somewhere here I think? Otherwise if it's 1 or >2 the array destructuring below will fail, no?
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's in the invalidTab
util https://github.com/TBD54566975/ftl/blob/main/console/client/src/utils/invalid-tab.utils.ts#L30-L35
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.
LGTM. 1 minor comment/question here.
schemas: [ | ||
{schema, uri: 'http://myserver/foo-schema.json', fileMatch: ['*']}, | ||
], |
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.
Is there a valid uri
we can use here? Or does this uri
not really matter here?
…ide-schema-validation