You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick and dirty solution could be to allow YAML data as input, but convert it to JSON behind the scenes.
A more proper solution would be even better ofc
I'm not against supporting it, just that a big part of this discussion is related to #258 (comment) : the parsing library, as you can also have YAML in $ref for instance. and must work transparently for end-users.
Currently, it seems that @apidevtools/json-schema-ref-parser is the best candidate (in lack of better & maintained one) : would be interesting if someone give a try. In theory, most changes would be in the entrypoint file as typings are almost correct (just resolverOptions would need a change to be compliant to new parser options) :
// What the user providesexporttypeProps={/** * The JSON schema to use */schema: unknown,/** * To customize the ref resolving * By default, only inline references will be dereferenced by @stoplight/json-ref-resolver */resolverOptions?: IResolveOpts}// What inner components usetypeInnerViewerProperties={schema: JSONSchema}
Would you or someone else like to give a hand ? Thx in advance
Repository owner locked and limited conversation to collaborators on Nov 6, 2024
Love this plugin!
It would be nice to add YAML schema support
A quick and dirty solution could be to allow YAML data as input, but convert it to JSON behind the scenes.
A more proper solution would be even better ofc