Skip to content

Commit

Permalink
fix(Swagger): Fixed the definition of top level parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfede committed Sep 12, 2017
1 parent 00435a3 commit ba13c87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class API implements Swagger {
consumes?: string[];
produces?: string[];
definitions?: Swagger.Definitions;
parameters?: Swagger.Parameters;
parameters?: Swagger.ParameterDefinitionObject;
responses?: Swagger.Responses;
security?: Swagger.Security[];
securityDefinitions?: Swagger.SecurityDefinitions;
Expand Down
6 changes: 5 additions & 1 deletion src/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Swagger {
consumes?: string[];
produces?: string[];
definitions?: Swagger.Definitions;
parameters?: Swagger.Parameters;
parameters?: Swagger.ParameterDefinitionObject;
responses?: Swagger.Responses;
security?: Swagger.Security[];
securityDefinitions?: Swagger.SecurityDefinitions;
Expand Down Expand Up @@ -46,6 +46,10 @@ export namespace Swagger {
[key:string]: Swagger.Schema
}

export interface ParameterDefinitionObject {
[id: string]: Parameter;
}

export type Parameters = (Parameter | Reference)[];

export interface Path {
Expand Down

0 comments on commit ba13c87

Please sign in to comment.