Skip to content

Commit

Permalink
CS-199 add all files for cypress which are generated by codGen
Browse files Browse the repository at this point in the history
  • Loading branch information
umeshaccion committed Jan 15, 2024
1 parent d74c8aa commit 8251d2c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 69 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/API_TESTING/pets/findPetsByStatus.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requestInfo.url = apiBaseURL + requestInfo.url;

describe('Finds Pets by status', () => {
it('successful operation', () => {
cy.fixture('400_application_json__findPetsByStatus').then(
cy.fixture('200_application_json__findPetsByStatus').then(
(fixtureResponse) => {
requestInfo.body = fixtureResponse.payload
? fixtureResponse.payload
Expand Down
162 changes: 94 additions & 68 deletions swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,83 @@
"read:pets"
]
}
],
"deprecated": true
]
}
},
"/pet": {
"put": {
"tags": [
"pets"
],
"summary": "Update an existing pet",
"operationId": "updatePet",
"requestBody": {
"description": "Pet object that needs to be added to the store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
},
"examples": {
"200": {
"summary": "positive",
"value": {
"id": 1234,
"catrgory": {
"id": 1,
"name": "BullDog"
},
"name": "Bruno",
"photoUrls": [
"https://germanshepard/burno.jpg"
],
"tags": [
{
"id": 1,
"name": "Tommy"
}
],
"status": "available"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Invalid ID supplied",
"content": {
"application/json": {
"example": {
"id": 1,
"name": "Bruno",
"photoUrls": [
"https://germanshepard/burno.jpg"
],
"tags": [
{
"id": 1,
"name": "Tommy"
}
],
"status": "available"
}
}
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
],
"x-codegen-request-body-name": "body"
},
"post": {
"tags": [
"pets"
Expand Down Expand Up @@ -278,15 +350,33 @@
}
],
"responses": {
"400": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiResponse"
"$ref": "#/components/schemas/Pet"
}
},
"example": {
"id": 1,
"catrgory": {
"id": 1,
"name": "German shepard"
},
"name": "Bruno",
"photoUrls": [
"https://germanshepard/burno.jpg"
],
"tags": [
{
"id": 1,
"name": "Tommy"
}
],
"status": "available"
}
}
}
Expand Down Expand Up @@ -499,70 +589,6 @@
}
]
},
"put": {
"tags": [
"pets"
],
"summary": "update a pet",
"operationId": "update",
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
},
"example": 1
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"type": "string",
"description": "Updated name of the pet"
},
"status": {
"type": "string",
"description": "Updated status of the pet"
}
}
},
"example": {
"name": "Bruno",
"status": "sold"
}
}
}
},
"responses": {
"200": {
"description": "Invalid input",
"content": {
"application/json": {
"example": {
"code": 201,
"type": "unknown",
"message": "updated succesfully"
}
}
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
},
"delete": {
"tags": [
"pets"
Expand Down

0 comments on commit 8251d2c

Please sign in to comment.