swagger-api / swagger-api/swagger-codegen
[ALL] `$ref` in root of defined schema not handled and causes error
Open
@gracekarina is already working on this.
Since May 29, 2019.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
$ref in root of defined schema not handled and causes error
e.g a schema defined as the one below causes an error
...
definitions:
Foo:
$ref: '#/definitions/Bar'
Bar:
type: string
...
Swagger-codegen version
latest master, probably also happening in 3.0.0
Swagger declaration file content or url
...
definitions:
Foo:
$ref: '#/definitions/Bar'
Bar:
type: string
...
Steps to reproduce
generate javascript client code with spec containing snippet above
This scenario should be handled, or at least a proper "not supported" error should be provided; this applies to master / OAS2 but probably also to 3.0.0 / OAS3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.