Describe the bug
Properties with anyOf schema are striped out from output transformers.
Given the following schemas:
user/model.yml
anyOf:
- $ref: ./driver/model.yml
- $ref: ./passenger/model.yml
discriminator:
propertyName: type
type: object
properties:
token:
type: string
readOnly: true
example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ5Y3BCVzRKSU0zYWVE...
user:
$ref: user/model.yml
required:
- user
- token
Produces
export default {
// authorize
authorize: {
token: String
}
}
To Reproduce
Steps to reproduce the behavior:
- Generate the backend from the swagger file
- Inspect the generated output transformer
Expected behavior
The transformer has the correct fields and types or at least allows any field to pass.
Node & NPM version
Node: 12.18.2
NPM: 6.14.8
Operating system:
- OS: MacOS
- Version: 11.2.2
Additional context
Using OAS3
Describe the bug
Properties with anyOf schema are striped out from output transformers.
Given the following schemas:
user/model.ymlProduces
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The transformer has the correct fields and types or at least allows any field to pass.
Node & NPM version
Node: 12.18.2
NPM: 6.14.8
Operating system:
Additional context
Using OAS3