diff --git a/postman_collections/modified_postman_openapi.json b/postman_collections/modified_postman_openapi.json new file mode 100644 index 00000000..7c36722e --- /dev/null +++ b/postman_collections/modified_postman_openapi.json @@ -0,0 +1,667 @@ +{ + "item": [ + { + "name": "products", + "item": [ + { + "name": "Get All Products", + "request": { + "name": "Get All Products", + "description": { + "content": "It gives you all products", + "type": "text/plain" + }, + "url": { + "path": [ + "products" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Successful operation", + "originalRequest": { + "url": { + "path": [ + "products" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"name\": \"apple\",\n \"id\": 10,\n \"description\": \"description of the product\",\n \"price\": 20\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + " \n// ********RoostGPT********\n/*\nTest generated by RoostGPT for test postman-openapi using AI Type Azure Open AI and AI Model roostgpt-4-32k\n\n\nTest generated for products for http method type get in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif(contentType === \"application/xml\"){\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function (err,result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result; \n }\n });\n} else{\n responseData = pm.response.json();\n}\nif (pm.variables.get(\"statusCode\")) {\n pm.expect(parseInt(pm.variables.get(\"statusCode\"))).to.be.equal(pm.response.code);\n}\n\nif (pm.response.code == 200){\n pm.test(\"Successful operation\", function () {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n pm.test('Response has the `id` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`id`)){\n if(pm.expect(ld.get(responseData, `id`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `id`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n pm.test('Response has the `name` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`name`)){\n if(pm.expect(ld.get(pm.response.json(), `name`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `name`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `description` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`description`)){\n if(pm.expect(ld.get(pm.response.json(), `description`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `description`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `price` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`price`)){\n if(pm.expect(ld.get(responseData, `price`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `price`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n });\n\n}\n" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Add a new product to the store", + "request": { + "name": "Add a new product to the store", + "description": { + "content": "Add a new product to the store", + "type": "text/plain" + }, + "url": { + "path": [ + "products" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*long}},\n \"description\": {{description_*string}},\n \"price\": {{price_*long}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Successful operation", + "originalRequest": { + "url": { + "path": [ + "products" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*number}},\n \"description\": {{description_*string}},\n \"price\": {{price_*number}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"name\": \"apple\",\n \"id\": 10,\n \"description\": \"description of the product\",\n \"price\": 20\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Invalid input", + "originalRequest": { + "url": { + "path": [ + "products" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*number}},\n \"description\": {{description_*string}},\n \"price\": {{price_*number}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Method Not Allowed", + "code": 405, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + " \n// ********RoostGPT********\n/*\nTest generated by RoostGPT for test postman-openapi using AI Type Azure Open AI and AI Model roostgpt-4-32k\n\n\nTest generated for products for http method type post in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif(contentType === \"application/xml\"){\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function (err,result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result; \n }\n });\n} else{\n responseData = pm.response.json();\n}\nif (pm.variables.get(\"statusCode\")) {\n pm.expect(parseInt(pm.variables.get(\"statusCode\"))).to.be.equal(pm.response.code);\n}\n\nif (pm.response.code == 200){\n pm.test(\"Successful operation\", function () {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n pm.test('Response has the `id` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`id`)){\n if(pm.expect(ld.get(responseData, `id`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `id`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n pm.test('Response has the `name` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`name`)){\n if(pm.expect(ld.get(pm.response.json(), `name`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `name`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `description` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`description`)){\n if(pm.expect(ld.get(pm.response.json(), `description`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `description`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `price` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`price`)){\n if(pm.expect(ld.get(responseData, `price`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `price`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n });\n\n}\n\nif (pm.response.code == 405){\n pm.test(\"Invalid input\", function () {\n pm.expect(pm.response.status).to.be.eql(\"Method Not Allowed\");\n });\n\n}\n" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "{productId}", + "item": [ + { + "name": "Find product by ID", + "request": { + "name": "Find product by ID", + "description": { + "content": "Returns a single product", + "type": "text/plain" + }, + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product to return" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "successful operation", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product to return" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"name\": \"apple\",\n \"id\": 10,\n \"description\": \"description of the product\",\n \"price\": 20\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Product not found", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product to return" + } + ] + }, + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + " \n// ********RoostGPT********\n/*\nTest generated by RoostGPT for test postman-openapi using AI Type Azure Open AI and AI Model roostgpt-4-32k\n\n\nTest generated for products/{productId} for http method type get in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif(contentType === \"application/xml\"){\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function (err,result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result; \n }\n });\n} else{\n responseData = pm.response.json();\n}\nif (pm.variables.get(\"statusCode\")) {\n pm.expect(parseInt(pm.variables.get(\"statusCode\"))).to.be.equal(pm.response.code);\n}\n\nif (pm.response.code == 200){\n pm.test(\"successful operation\", function () {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n pm.test('Response has the `id` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`id`)){\n if(pm.expect(ld.get(responseData, `id`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `id`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n pm.test('Response has the `name` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`name`)){\n if(pm.expect(ld.get(pm.response.json(), `name`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `name`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `description` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`description`)){\n if(pm.expect(ld.get(pm.response.json(), `description`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `description`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `price` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`price`)){\n if(pm.expect(ld.get(responseData, `price`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `price`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n });\n\n}\n\nif (pm.response.code == 404){\n pm.test(\"Product not found\", function () {\n pm.expect(pm.response.status).to.be.eql(\"Not Found\");\n });\n\n}\n" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Updates a product in the store with form data", + "request": { + "name": "Updates a product in the store with form data", + "description": { + "content": "", + "type": "text/plain" + }, + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product that needs to be updated" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*long}},\n \"description\": {{description_*string}},\n \"price\": {{price_*long}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Updated Product", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product that needs to be updated" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*number}},\n \"description\": {{description_*string}},\n \"price\": {{price_*number}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"name\": \"apple\",\n \"id\": 10,\n \"description\": \"description of the product\",\n \"price\": 20\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Not Found", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) ID of product that needs to be updated" + } + ] + }, + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"name\": {{name_*string}},\n \"id\": {{id_*number}},\n \"description\": {{description_*string}},\n \"price\": {{price_*number}}\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + " \n// ********RoostGPT********\n/*\nTest generated by RoostGPT for test postman-openapi using AI Type Azure Open AI and AI Model roostgpt-4-32k\n\n\nTest generated for products/{productId} for http method type put in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif(contentType === \"application/xml\"){\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function (err,result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result; \n }\n });\n} else{\n responseData = pm.response.json();\n}\nif (pm.variables.get(\"statusCode\")) {\n pm.expect(parseInt(pm.variables.get(\"statusCode\"))).to.be.equal(pm.response.code);\n}\n\nif (pm.response.code == 200){\n pm.test(\"Updated Product\", function () {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n pm.test('Response has the `id` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`id`)){\n if(pm.expect(ld.get(responseData, `id`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `id`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n pm.test('Response has the `name` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`name`)){\n if(pm.expect(ld.get(pm.response.json(), `name`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `name`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `description` field',function(){\n if(pm.expect(pm.response.json()).to.have.nested.property(`description`)){\n if(pm.expect(ld.get(pm.response.json(), `description`, null)).to.exist){\n pm.expect(typeof ld.get(pm.response.json(), `description`, null)).to.equal(\"string\");\n }\n\n }\n\n })\n\n pm.test('Response has the `price` field',function(){\n if(pm.expect(responseData).to.have.nested.property(`price`)){\n if(pm.expect(ld.get(responseData, `price`, 200)).to.exist){\n pm.expect(typeof ld.get(responseData, `price`, 200)).to.equal(\"number\");\n }\n\n }\n\n })\n\n });\n\n}\n\nif (pm.response.code == 404){\n pm.test(\"Not Found\", function () {\n pm.expect(pm.response.status).to.be.eql(\"Not Found\");\n });\n\n}\n" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Deletes a product", + "request": { + "name": "Deletes a product", + "description": { + "content": "delete a product", + "type": "text/plain" + }, + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) Product id to delete" + } + ] + }, + "method": "DELETE", + "auth": null + }, + "response": [ + { + "name": "Product deleted", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) Product id to delete" + } + ] + }, + "method": "DELETE", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Not Found", + "originalRequest": { + "url": { + "path": [ + "products", + ":productId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "{{productId}}", + "key": "productId", + "description": "(Required) Product id to delete" + } + ] + }, + "method": "DELETE", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [ + { + "listen": "test", + "script": { + "exec": [ + " \n// ********RoostGPT********\n/*\nTest generated by RoostGPT for test postman-openapi using AI Type Azure Open AI and AI Model roostgpt-4-32k\n\n\nTest generated for products/{productId} for http method type delete in postman framework\n\n*/\n\n// ********RoostGPT********\n\n\nconst ld = require('lodash');\nlet responseData;\nconst contentType = pm.response.headers.get('Content-Type');\nif(contentType === \"application/xml\"){\n var parseString = require('xml2js').parseString;\n parseString(pm.response.body, function (err,result) {\n if (err) {\n console.error('Error parsing XML:', err);\n } else {\n responseData = result; \n }\n });\n} else{\n responseData = pm.response.json();\n}\nif (pm.variables.get(\"statusCode\")) {\n pm.expect(parseInt(pm.variables.get(\"statusCode\"))).to.be.equal(pm.response.code);\n}\n\nif (pm.response.code == 200){\n pm.test(\"Product deleted\", function () {\n pm.expect(pm.response.status).to.be.eql(\"OK\");\n });\n\n}\n\nif (pm.response.code == 404){\n pm.test(\"Not Found\", function () {\n pm.expect(pm.response.status).to.be.eql(\"Not Found\");\n });\n\n}\n" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + } + ], + "event": [] + } + ], + "event": [], + "variable": [ + { + "type": "string", + "value": "http://52.66.106.18:8080/api", + "key": "baseUrl" + }, + { + "type": "integer", + "value": 200, + "key": "statusCode" + } + ], + "info": { + "_postman_id": "3c201a0c-8fc7-4df9-bfe2-8b6a841b3b61", + "name": "Swagger My-Products - OpenAPI 3.0", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "This page is for my products api spec", + "type": "text/plain" + } + } +} \ No newline at end of file diff --git a/postman_collections/postman-openapi/Add_a_new_product_to_the_store.json b/postman_collections/postman-openapi/Add_a_new_product_to_the_store.json new file mode 100644 index 00000000..9706910c --- /dev/null +++ b/postman_collections/postman-openapi/Add_a_new_product_to_the_store.json @@ -0,0 +1,42 @@ +[ + { + "name": "apple", + "id": 10, + "description": "Fresh apples from the orchard.", + "price": 20, + "statusCode": 200, + "scenario": "Successful operation" + }, + { + "name": "orange", + "id": 15, + "description": "Organic oranges packed with vitamin C.", + "price": 30, + "statusCode": 200, + "scenario": "Successful operation" + }, + { + "name": "invalid_name_*?", + "id": -1, + "description": "", + "price": -100, + "statusCode": 405, + "scenario": "Invalid input" + }, + { + "name": "pear", + "id": 20, + "description": "Sweet yellow pears picked fresh.", + "price": 25, + "statusCode": 200, + "scenario": "Successful operation" + }, + { + "name": "!", + "id": 10000000000000000000, + "description": "?", + "price": 0, + "statusCode": 405, + "scenario": "Invalid input" + } +] \ No newline at end of file diff --git a/postman_collections/postman-openapi/Deletes_a_product.json b/postman_collections/postman-openapi/Deletes_a_product.json new file mode 100644 index 00000000..7d6adb01 --- /dev/null +++ b/postman_collections/postman-openapi/Deletes_a_product.json @@ -0,0 +1,27 @@ +[ + { + "productId": 123456, + "statusCode": 200, + "scenario": "Product deleted" + }, + { + "productId": 789012, + "statusCode": 200, + "scenario": "Product deleted" + }, + { + "productId": -1, + "statusCode": 404, + "scenario": "Not Found" + }, + { + "productId": 99999999999, + "statusCode": 404, + "scenario": "Not Found" + }, + { + "productId": "invalid", + "statusCode": 404, + "scenario": "Not Found" + } +] \ No newline at end of file diff --git a/postman_collections/postman-openapi/Find_product_by_ID.json b/postman_collections/postman-openapi/Find_product_by_ID.json new file mode 100644 index 00000000..18a84cd8 --- /dev/null +++ b/postman_collections/postman-openapi/Find_product_by_ID.json @@ -0,0 +1,27 @@ +[ + { + "productId": 101, + "statusCode": 200, + "scenario": "successful operation" + }, + { + "productId": 102, + "statusCode": 200, + "scenario": "successful operation" + }, + { + "productId": "INVALID_ID", + "statusCode": 404, + "scenario": "Product not found" + }, + { + "productId": 105, + "statusCode": 200, + "scenario": "successful operation" + }, + { + "productId": "INVALID_PRODUCT", + "statusCode": 404, + "scenario": "Product not found" + } +] \ No newline at end of file diff --git a/postman_collections/postman-openapi/Updates_a_product_in_the_store_with_form_data.json b/postman_collections/postman-openapi/Updates_a_product_in_the_store_with_form_data.json new file mode 100644 index 00000000..0f12ee03 --- /dev/null +++ b/postman_collections/postman-openapi/Updates_a_product_in_the_store_with_form_data.json @@ -0,0 +1,47 @@ +[ + { + "productId": "PRD001", + "name": "apple", + "id": 10, + "description": "description of the product", + "price": 20, + "statusCode": 200, + "scenario": "Updated Product" + }, + { + "productId": "PRD002", + "name": "banana", + "id": 11, + "description": "fresh yellow bananas", + "price": 25, + "statusCode": 200, + "scenario": "Updated Product" + }, + { + "productId": "invalid_id", + "name": "", + "id": -1, + "description": "", + "price": -20, + "statusCode": 404, + "scenario": "Not Found" + }, + { + "productId": "PRDXX", + "name": "unknown", + "id": 0, + "description": "description is missing", + "price": 0, + "statusCode": 404, + "scenario": "Not Found" + }, + { + "productId": "PRD003", + "name": "cherry", + "id": 12, + "description": "description of cherry product", + "price": 30, + "statusCode": 200, + "scenario": "Updated Product" + } +] \ No newline at end of file