question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

YAML anchors/aliases can confuse converter

See original GitHub issue

Checklist

  • Conversion: I have checked my source definition is valid OpenAPI 2.0
  • Conversion: On valid OpenAPI 2.0 input, the conversion looks wrong

Detailed Description

When converting a valid v2 to v3 I get an error saying (Patchable) parameter.type is mandatory for non-body parameters. After some debugging, seems like the raw spec of the parameters is converted to json schema and instead of having a .type property the parameter object has a .schema.type instead.

Other stuff

Using latest version

Any ideas what can be wrong?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
MikeRalphsoncommented, Mar 24, 2020

Should be fixed in swagger2openapi v6.0.0. You will need to pass in the --anchors option or set options.anchors to true. Thanks for flagging this up.

1reaction
MikeRalphsoncommented, Apr 13, 2020

No, unfortunately there is not (as far as I know) any similar functionality in YAML 1.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

YAML Examples for Anchors, Aliases, and Overrides | Linode
This guide gives you examples for using YAML anchors, aliases, and overrides, which are features of the YAML language that help keep your ......
Read more >
Read and write YAML files without destroying anchors and ...
The problem here is that anchors and aliases in Yaml are a serialization detail, and so aren't part of the data after it's...
Read more >
YAML Ain't Markup Language (YAML™) revision 1.2.2
YAML leverages these primitives and adds a simple typing system and aliasing mechanism to form a complete language for serializing any native ...
Read more >
YAML anchors | Bitbucket Cloud - Atlassian Support
They can reduce effort and make updating in bulk, easier. Anchors and aliases. There are 2 parts to this: The anchor '&' which...
Read more >
YAML anchors and aliases and how to disable them |
Dumper used by PyYAML can recognize Python variables and data structures pointing to the same object. This can often happen with deeply nested ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found