You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Including a default response type for errors (per Swagger recommendation overrides the type for specified status codes.
Example:
spec
paths:
/templates/{id}:
get:
summary: Retrieve a Template
description: Returns a given Template by ID
parameters:
- in: path
name: id
description: ID of Template to fetch
required: true
schema:
type: string
responses:
'200':
description: Template response
content:
application/json:
schema:
$ref: '#/components/schemas/Template'
default:
description: Not found error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
types.gen.ts
export type $OpenApiTs = {
'/templates/{id}': {
get: {
req: {
/**
* ID of Template to fetch
*/
id: string;
};
res: {
/**
* Not found error
*/
200: Error;
};
};
};
}
OpenAPI specification (optional)
paths:
/templates/{id}:
get:
summary: Retrieve a Template
description: Returns a given Template by ID
parameters:
- in: path
name: id
description: ID of Template to fetch
required: true
schema:
type: string
responses:
'200':
description: Template response
content:
application/json:
schema:
$ref: '#/components/schemas/Template'
default:
description: Not found error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Description
Including a default response type for errors (per Swagger recommendation overrides the type for specified status codes.
Example:
spec
types.gen.ts
OpenAPI specification (optional)
Configuration
System information (optional)
The text was updated successfully, but these errors were encountered: