Skip to main content

Swagger Project

🎯 Objective​

Create the Swagger project structure with the API calls created by @Cristian Varela Lea (Unlicensed) in Postman.

📜 Code in JSON format

<![CDATA[{
"openapi": "3.0.0",
"info": {
"title": "InstanciaDevRequest",
"description": "# 🚀 Get started here\n\nThis template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.\n\n## 🔖 **How to use this template**\n\n#### **Step 1: Send requests**\n\nRESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.\n\nThis collection contains each of these [request](https://learning.postman.com/docs/sending-requests/requests/) types. Open each request and click \"Send\" to see what happens.\n\n#### **Step 2: View responses**\n\nObserve the response tab for status code (200 OK), response time, and size.\n\n#### **Step 3: Send new Body data**\n\nUpdate or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.\n\n```\n{ \"name\": \"Add your name in the body\" }\n```\n#### **Step 4: Update the variable**\n\nVariables enable you to store and reuse values in Postman. We have created a [variable](https://learning.postman.com/docs/sending-requests/variables/) called `base_url` with the sample request [https://postman-api-learner.glitch.me](https://postman-api-learner.glitch.me). Replace it with your API endpoint to customize this collection.\n\n#### **Step 5: Add tests in the \"Tests\" tab**\n\nTests help you confirm that your API is working as expected. You can write test scripts in JavaScript and view the output in the \"Test Results\" tab.\n\n<img src=\"https://content.pstmn.io/b5f280a7-4b09-48ec-857f-0a7ed99d7ef8/U2NyZWVuc2hvdCAyMDIzLTAzLTI3IGF0IDkuNDcuMjggUE0ucG5n\" />\n\n## 💪 Pro tips\n\n- Use folders to group related requests and organize the collection.\n- Add more [scripts](https://learning.postman.com/docs/writing-scripts/intro-to-scripts/) in \"Tests\" to verify if the API works as expected and execute workflows.\n\n## 💡Related templates\n\n[API testing basics](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9a37a28-055b-49cd-8c7e-97494a21eb54&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[API documentation](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9c28f47-1253-44af-a2f3-20dce4da1f18&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[Authorization methods](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=31a9a6ed-4cdf-4ced-984c-d12c9aec1c27&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719)",
"version": "1.0.0"
},
"servers": [
{
"url": "http://dev-speg-0001.xunta.local:12448"
},
{
"url": "http://dev-speg-0002.xunta.local:12448"
}
],
"components": {
"securitySchemes": {
"basicAuth": {
"type": "http",
"scheme": "basic"
}
}
},
"paths": {
"/openesb/api/assemblies": {
"get": {
"tags": [
"General"
],
"summary": "GetServiceAssemblies",
"security": [
{
"basicAuth": []
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {}
}
}
}
}
},
"/openesb/api/assemblies/{nombreCA}/descriptor": {
"get": {
"tags": [
"General"
],
"summary": "GetDescriptorCA",
"security": [
{
"basicAuth": []
}
],
"parameters": [
{
"name": "nombreCA",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {}
}
}
}
}
},
"/openesb/api/assemblies/{nombreCA}": {
"get": {
"tags": [
"General"
],
"summary": "GetGeneralCA",
"security": [
{
"basicAuth": []
}
],
"parameters": [
{
"name": "nombreCA",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {}
}
}
}
}
}
}
}]]>

 Code in YAML format​

<![CDATA[
"openapi": "3.0.0"
"info":
"title": "InstanciaDevRequest"
"description": "# 🚀 Get started here\n\nThis template guides you through CRUD operations (GET, POST, PUT, DELETE), variables, and tests.\n\n## 🔖 **How to use this template**\n\n#### **Step 1: Send requests**\n\nRESTful APIs allow you to perform CRUD operations using the POST, GET, PUT, and DELETE HTTP methods.\n\nThis collection contains each of these [request](https://learning.postman.com/docs/sending-requests/requests/) types. Open each request and click \"Send\" to see what happens.\n\n#### **Step 2: View responses**\n\nObserve the response tab for status code (200 OK), response time, and size.\n\n#### **Step 3: Send new Body data**\n\nUpdate or add new data in \"Body\" in the POST request. Typically, Body data is also used in PUT request.\n\n```\n{ \"name\": \"Add your name in the body\" }\n```\n#### **Step 4: Update the variable**\n\nVariables enable you to store and reuse values in Postman. We have created a [variable](https://learning.postman.com/docs/sending-requests/variables/) called `base_url` with the sample request [https://postman-api-learner.glitch.me](https://postman-api-learner.glitch.me). Replace it with your API endpoint to customize this collection.\n\n#### **Step 5: Add tests in the \"Tests\" tab**\n\nTests help you confirm that your API is working as expected. You can write test scripts in JavaScript and view the output in the \"Test Results\" tab.\n\n<img src=\"https://content.pstmn.io/b5f280a7-4b09-48ec-857f-0a7ed99d7ef8/U2NyZWVuc2hvdCAyMDIzLTAzLTI3IGF0IDkuNDcuMjggUE0ucG5n\" />\n\n## 💪 Pro tips\n\n- Use folders to group related requests and organize the collection.\n- Add more [scripts](https://learning.postman.com/docs/writing-scripts/intro-to-scripts/) in \"Tests\" to verify if the API works as expected and execute workflows.\n\n## 💡Related templates\n\n[API testing basics](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9a37a28-055b-49cd-8c7e-97494a21eb54&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[API documentation](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=e9c28f47-1253-44af-a2f3-20dce4da1f18&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719) \n[Authorization methods](https://go.postman.co/redirect/workspace?type=personal&collectionTemplateId=31a9a6ed-4cdf-4ced-984c-d12c9aec1c27&sourceTemplateId=ddb19591-3097-41cf-82af-c84273e56719)"
"version": "1.0.0"
"servers":
-
"url": "http://dev-speg-0001.xunta.local:12448"
-
"url": "http://dev-speg-0002.xunta.local:12448"
"components":
"securitySchemes":
"basicAuth":
"type": "http"
"scheme": "basic"
"paths":
"/openesb/api/assemblies":
"get":
"tags":
- "General"
"summary": "GetServiceAssemblies"
"security":
-
"basicAuth": []
"responses":
"200":
"description": "Successful response"
"content":
"application/json": {}
"/openesb/api/assemblies/{nombreCA}/descriptor":
"get":
"tags":
- "General"
"summary": "GetDescriptorCA"
"security":
-
"basicAuth": []
"parameters":
-
"name": "nombreCA"
"in": "path"
"schema":
"type": "string"
"required": true
"responses":
"200":
"description": "Successful response"
"content":
"application/json": {}
"/openesb/api/assemblies/{nombreCA}":
"get":
"tags":
- "General"
"summary": "GetGeneralCA"
"security":
-
"basicAuth": []
"parameters":
-
"name": "nombreCA"
"in": "path"
"schema":
"type": "string"
"required": true
"responses":
"200":
"description": "Successful response"
"content":
"application/json": {}]]>