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
I have tried to parse openapi spec with $ref: #/foo/bar properties, it seems that # always acts as a comment and parse function always returns null for $ref property. Moreover, reviver function (key, value) => string already getting null for such values.
Describe the solution you'd like
YAML.parse(str, reviver?, options = {}) could provide:
additional option to define the list of specific keys like ['$ref', ...]
additional optional key-value mapper "originalReviver" which will be called for every specific tag with original yaml value
Describe alternatives you've considered
It seems that I have to preprocess yaml files, collect $refs values before YAML.parse() and patch result object with original values after YAML.parse()
The text was updated successfully, but these errors were encountered:
This sounds like an API layer you may build on top of the library, or find if one is already available for OpenAPI content. It's not a YAML feature, though, so not appropriate to include here directly.
Scalar values starting with # will, however, need to be quoted to not be parsed as comments.
Is your feature request related to a problem? Please describe.
YAML.parse(...) for
returns
I have tried to parse openapi spec with $ref: #/foo/bar properties, it seems that # always acts as a comment and parse function always returns null for $ref property. Moreover, reviver function (key, value) => string already getting null for such values.
Describe the solution you'd like
YAML.parse(str, reviver?, options = {}) could provide:
Describe alternatives you've considered
It seems that I have to preprocess yaml files, collect $refs values before YAML.parse() and patch result object with original values after YAML.parse()
The text was updated successfully, but these errors were encountered: