-
Notifications
You must be signed in to change notification settings - Fork 74
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
YAML merge keys are identified as as Invalid Key errors #87
Comments
Thanks for reporting this, needs to be fixed. |
No problem. I have also just this morning noticed that using merge keys also appears to break the Swagger UI generation. |
@jamiethompson are you able to share the Swagger file a bit more? How does the I want to create proper tests for the merge keys, this would be valuable test data. |
No problem, here's what the responses:
Default: &default_response
# Errors
400:
$ref: '#/responses/400BadRequest'
401:
$ref: '#/responses/401Unauthorized'
403:
$ref: '#/responses/403Forbidden'
404:
$ref: '#/responses/404NotFound'
409:
$ref: '#/responses/409Conflict'
429:
$ref: '#/responses/429TooManyRequests'
500:
$ref: '#/responses/500InternalServerError'
503:
$ref: '#/responses/503ServiceUnavailable' Let me know if you need anything more |
Exclude YAML merge and anchor keys when validating Swagger keys. Fixes #87
Exclude YAML merge and anchor keys when validating Swagger keys. Fixes #87
Unfortunately Jackson does not support transforming YAML to JSON with merge keys and anchors (we use Jackson to transform YAML to JSON for Swagger UI). |
Thanks for the example spec, this is fixed now. I still need to make a release, should happen by the end of next week. |
No problem. I look forward to the release 😄 |
FYI: I made a PR for JetBrains about anchors and aliases in YAML files. In the future we can hopefully jump to declaration by clicking an alias :) JetBrains/intellij-community#577 |
Wow, thanks. That would make writing large specs so much easier. |
@jamiethompson The plugin has been updated, you should no longer see the errors. |
Thank you. Updated today. Works a treat. |
Does Swagger UI still suffer from this issue? |
When using YAML merge keys to merge in aliases, the merge keys are identified as errors 'Invalid key'
Example YAML
The text was updated successfully, but these errors were encountered: