mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
express-openapi: Allow reference in schema property of response object
This commit is contained in:
@@ -40,6 +40,10 @@ get.apiDoc = {
|
||||
}
|
||||
],
|
||||
responses: {
|
||||
200: {
|
||||
description: "valid user object",
|
||||
schema: {$ref: '#/definitions/user'}
|
||||
},
|
||||
default: {$ref: '#/definitions/error'}
|
||||
},
|
||||
"x-some-vendor-property": {}
|
||||
|
||||
6
express-openapi/express-openapi.d.ts
vendored
6
express-openapi/express-openapi.d.ts
vendored
@@ -128,7 +128,7 @@ declare module "express-openapi" {
|
||||
|
||||
export interface ResponseObject {
|
||||
description: string
|
||||
schema?: SchemaObject
|
||||
schema?: Schema
|
||||
headers?: HeadersObject
|
||||
examples?: ExampleObject
|
||||
}
|
||||
@@ -209,7 +209,7 @@ declare module "express-openapi" {
|
||||
}
|
||||
|
||||
export interface InBodyParameterObject extends ParameterObject {
|
||||
schema: SchemaObject
|
||||
schema: Schema
|
||||
}
|
||||
|
||||
export interface GeneralParameterObject extends ParameterObject, ItemsObject {
|
||||
@@ -226,6 +226,8 @@ declare module "express-openapi" {
|
||||
url: string
|
||||
}
|
||||
|
||||
type Schema = SchemaObject | ReferenceObject
|
||||
|
||||
export interface SchemaObject extends IJsonSchema {
|
||||
[index: string]: any
|
||||
discriminator?: string
|
||||
|
||||
Reference in New Issue
Block a user