Skip to content

Commit

Permalink
Fix typings for SwaggerInitOptions.defaults.getOperationRefs, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mairu committed Mar 3, 2020
1 parent 2992aa3 commit 9569130
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
9 changes: 0 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@feathersjs/feathers": "^4.3.0",
"@mairu/swagger-ui-apikey-auth-form": "^1.0.0",
"@types/express": "^4.16.1",
"@types/feathersjs__feathers": "^3.1.5",
"chai": "^4.2.0",
"cors": "^2.8.5",
"dtslint": "^2.0.2",
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface OperationRefs {
[customMethodRef: string]: string | undefined;
}

interface FnGetOperationRefs {
interface FnGetOperationsRefs {
(model: string, service: feathersSwagger.SwaggerService<any>): OperationRefs;
}

Expand Down Expand Up @@ -117,7 +117,7 @@ declare namespace feathersSwagger {
appProperty?: string;
defaults?: {
getOperationArgs?: FnGetOperationArgs;
getOperationRefs?: FnGetOperationRefs;
getOperationsRefs?: FnGetOperationsRefs;
schemasGenerator?: FnSchemasGenerator;
operationGenerators?: {
find?: FnOperationSpecsGenerator;
Expand Down
2 changes: 1 addition & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ swagger({
appProperty: 'docs',
defaults: {
getOperationArgs({ service, config, apiPath, path, version }: GetOperationArgsOptions) { return {}; },
getOperationRefs(model: string, service: SwaggerService<any>) {
getOperationsRefs(model: string, service: SwaggerService<any>) {
return {
createRequest: 'model',
createResponse: 'model',
Expand Down

0 comments on commit 9569130

Please sign in to comment.