-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Lack of default and exmaple properties in SDK schema #1460
Comments
Thanks for a great tool overall! components:
schemas:
MyObject:
type: object
properties:
clientId:
type: string
format: string
description: client identifier
example: my-example-client-id
nullable: true
pattern: "^[a-zA-Z0-9 -_]*"
keepAlive:
type: integer
format: int32
default: 240
description: keepAlive
maximum: 65535
minimum: 0 and I'm getting this: export const $MyObject = {
properties: {
clientId: {
type: 'string',
description: `client identifier.`,
isRequired: true,
isNullable: true,
format: 'string',
pattern: '^[a-zA-Z0-9 -_]*',
},
keepAlive: {
type: 'number',
description: `keepAlive`,
isRequired: true,
format: 'int32',
maximum: 65535,
},
|
also missing patternProperties |
I have fixed the issue with |
Describe the bug
For OpenAPI type schema
openapi-typescript-codegen --exportSchemas true
does not generatedefault
norexample
properties in SDK schema (schemas/$MyNumber.ts
):Schema should include both (expecially
default
that may be useful for clients).The text was updated successfully, but these errors were encountered: