We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
allOf
Given the following schema:
swagger: '2.0' paths: "/api/v1/users": get: summary: Get users operationId: GetUserRoute responses: '200': description: Ok schema: type: array items: "$ref": "#/definitions/user" definitions: user: type: object allOf: - "$ref": "#/definitions/requiredUser" - "$ref": "#/definitions/optionalUser" requiredUser: type: object allOf: - "$ref": "#/definitions/email" required: - id properties: id: type: string email: type: string optionalUser: type: object allOf: - "$ref": "#/definitions/address" properties: name: type: string address: type: object properties: zipCode: type: string street: type: string
It describes a user that is allOf: requiredUser, optionalUser. And they are again composed of properties and allOf.
user
allOf: requiredUser, optionalUser
properties
Then the generated user.ts looks like this:
user.ts
import { OptionalUser } from './optionalUser'; import { RequiredUser } from './requiredUser'; export interface User extends RequiredUser { name?: string; }
So all of requiredUser is included, and only the immediate properties of optionalUser but not the address from the allOf.
requiredUser
optionalUser
address
My expectation would be:
import { OptionalUser } from './optionalUser'; import { RequiredUser } from './requiredUser'; export interface User extends RequiredUser, OptionalUser { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given the following schema:
It describes a
user
that isallOf: requiredUser, optionalUser
.And they are again composed of
properties
andallOf
.Then the generated
user.ts
looks like this:So all of
requiredUser
is included, and only the immediateproperties
ofoptionalUser
but not theaddress
from theallOf
.My expectation would be:
The text was updated successfully, but these errors were encountered: