diff --git a/.github/stale.yml b/.github/stale.yml index 7a6a571..f767674 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -6,10 +6,10 @@ daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - "Type: Security" + - 'Type: Security' # Label to use when marking an issue as stale -staleLabel: "Status: Abandoned" +staleLabel: 'Status: Abandoned' # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > diff --git a/api-spec.json b/api-spec.json index 0b3d910..f8f4d85 100644 --- a/api-spec.json +++ b/api-spec.json @@ -37,27 +37,16 @@ } } ], - "schemes": [ - "https", - "http" - ], + "schemes": ["https", "http"], "paths": { "/pet": { "post": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Add a new pet to the store", "description": "", "operationId": "addPet", - "consumes": [ - "application/json", - "application/xml" - ], - "produces": [ - "application/xml", - "application/json" - ], + "consumes": ["application/json", "application/xml"], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -76,28 +65,17 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] }, "put": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Update an existing pet", "description": "", "operationId": "updatePet", - "consumes": [ - "application/json", - "application/xml" - ], - "produces": [ - "application/xml", - "application/json" - ], + "consumes": ["application/json", "application/xml"], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -122,26 +100,18 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] } }, "/pet/findByStatus": { "get": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Finds Pets by status", "description": "Multiple status values can be provided with comma separated strings", "operationId": "findPetsByStatus", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "status", @@ -151,11 +121,7 @@ "type": "array", "items": { "type": "string", - "enum": [ - "available", - "pending", - "sold" - ], + "enum": ["available", "pending", "sold"], "default": "available" }, "collectionFormat": "multi" @@ -177,26 +143,18 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] } }, "/pet/findByTags": { "get": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Finds Pets by tags", "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", "operationId": "findPetsByTags", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "tags", @@ -226,10 +184,7 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ], "deprecated": true @@ -237,16 +192,11 @@ }, "/pet/{petId}": { "get": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Find pet by ID", "description": "Returns a single pet", "operationId": "getPetById", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "petId", @@ -287,19 +237,12 @@ ] }, "post": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Updates a pet in the store with form data", "description": "", "operationId": "updatePetWithForm", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/xml", - "application/json" - ], + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "petId", @@ -331,24 +274,16 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] }, "delete": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "Deletes a pet", "description": "", "operationId": "deletePet", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "api_key", @@ -375,28 +310,19 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] } }, "/pet/{petId}/uploadImage": { "post": { - "tags": [ - "pet" - ], + "tags": ["pet"], "summary": "uploads an image", "description": "", "operationId": "uploadFile", - "consumes": [ - "multipart/form-data" - ], - "produces": [ - "application/json" - ], + "consumes": ["multipart/form-data"], + "produces": ["application/json"], "parameters": [ { "name": "petId", @@ -431,25 +357,18 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" - ] + "petstore_auth": ["write:pets", "read:pets"] } ] } }, "/store/inventory": { "get": { - "tags": [ - "store" - ], + "tags": ["store"], "summary": "Returns pet inventories by status", "description": "Returns a map of status codes to quantities", "operationId": "getInventory", - "produces": [ - "application/json" - ], + "produces": ["application/json"], "parameters": [], "responses": { "200": { @@ -472,16 +391,11 @@ }, "/store/order": { "post": { - "tags": [ - "store" - ], + "tags": ["store"], "summary": "Place an order for a pet", "description": "", "operationId": "placeOrder", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -508,16 +422,11 @@ }, "/store/order/{orderId}": { "get": { - "tags": [ - "store" - ], + "tags": ["store"], "summary": "Find purchase order by ID", "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", "operationId": "getOrderById", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "orderId", @@ -546,16 +455,11 @@ } }, "delete": { - "tags": [ - "store" - ], + "tags": ["store"], "summary": "Delete purchase order by ID", "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors", "operationId": "deleteOrder", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "orderId", @@ -579,16 +483,11 @@ }, "/user": { "post": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Create user", "description": "This can only be done by the logged in user.", "operationId": "createUser", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -609,16 +508,11 @@ }, "/user/createWithArray": { "post": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Creates list of users with given input array", "description": "", "operationId": "createUsersWithArrayInput", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -642,16 +536,11 @@ }, "/user/createWithList": { "post": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Creates list of users with given input array", "description": "", "operationId": "createUsersWithListInput", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "in": "body", @@ -675,16 +564,11 @@ }, "/user/login": { "get": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Logs user into the system", "description": "", "operationId": "loginUser", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "username", @@ -728,16 +612,11 @@ }, "/user/logout": { "get": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Logs out current logged in user session", "description": "", "operationId": "logoutUser", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [], "responses": { "default": { @@ -748,16 +627,11 @@ }, "/user/{username}": { "get": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Get user by user name", "description": "", "operationId": "getUserByName", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "username", @@ -783,16 +657,11 @@ } }, "put": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Updated user", "description": "This can only be done by the logged in user.", "operationId": "updateUser", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "username", @@ -821,16 +690,11 @@ } }, "delete": { - "tags": [ - "user" - ], + "tags": ["user"], "summary": "Delete user", "description": "This can only be done by the logged in user.", "operationId": "deleteUser", - "produces": [ - "application/xml", - "application/json" - ], + "produces": ["application/xml", "application/json"], "parameters": [ { "name": "username", @@ -890,11 +754,7 @@ "status": { "type": "string", "description": "Order Status", - "enum": [ - "placed", - "approved", - "delivered" - ] + "enum": ["placed", "approved", "delivered"] }, "complete": { "type": "boolean", @@ -972,10 +832,7 @@ }, "Pet": { "type": "object", - "required": [ - "name", - "photoUrls" - ], + "required": ["name", "photoUrls"], "properties": { "id": { "type": "integer", @@ -1011,11 +868,7 @@ "status": { "type": "string", "description": "pet status in the store", - "enum": [ - "available", - "pending", - "sold" - ] + "enum": ["available", "pending", "sold"] } }, "xml": { diff --git a/src/Contracts/index.ts b/src/Contracts/index.ts index 444404c..e44b09f 100644 --- a/src/Contracts/index.ts +++ b/src/Contracts/index.ts @@ -12,7 +12,7 @@ import { assert } from 'chai' /** * Unnecessary similar methods have been removed */ -export type ChaiAssert = { [K in keyof typeof assert]: typeof assert[K] } +export type ChaiAssert = { [K in keyof typeof assert]: (typeof assert)[K] } /** * Assert contract