mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
refine swagger2 parameter types (#30452)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
5c49d4ddc6
commit
8745a252e8
+2
-2
@@ -87,7 +87,7 @@ export interface Path {
|
||||
options?: Operation;
|
||||
head?: Operation;
|
||||
patch?: Operation;
|
||||
parameters?: Parameter[] | Reference[];
|
||||
parameters?: Array<Parameter | Reference>;
|
||||
}
|
||||
|
||||
// ----------------------------- Operation -----------------------------------
|
||||
@@ -99,7 +99,7 @@ export interface Operation {
|
||||
operationId?: string;
|
||||
produces?: string[];
|
||||
consumes?: string[];
|
||||
parameters?: Parameter[] | Reference[];
|
||||
parameters?: Array<Parameter | Reference>;
|
||||
schemes?: string[];
|
||||
deprecated?: boolean;
|
||||
security?: Security[];
|
||||
|
||||
@@ -1365,7 +1365,13 @@ const reference_support: swagger.Spec = {
|
||||
"/path": {
|
||||
"get": {
|
||||
"parameters": [
|
||||
{"$ref": "#/parameters/operationParameter"}
|
||||
{"$ref": "#/parameters/operationParameter"},
|
||||
{
|
||||
"in": "body",
|
||||
"name": "bodyParameter",
|
||||
"type": "string",
|
||||
"description": "The body parameter"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -1380,7 +1386,13 @@ const reference_support: swagger.Spec = {
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{"$ref": "#/parameters/pathParameter"}
|
||||
{"$ref": "#/parameters/pathParameter"},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "queryParameter",
|
||||
"type": "string",
|
||||
"description": "Another query parameter"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user