#Updating openapi specification with swagger editor
Explore tagged Tumblr posts
Text
API in Dell Boomi
Title: Building a Robust Blog API with Dell Boomi
Introduction
Briefly explain the value of APIs, especially in the context of content management and distribution for a blog.
Highlight Dell Boomi as a powerful iPaaS (Integration Platform as a Service) solution for API development.
Prerequisites
Boomi Essentials: Assume basic familiarity with Boomi processes, connectors, and data mapping.
Database Setup: Have a database (MySQL, PostgreSQL, etc.) to store your blog data (posts, categories, authors).
REST API Understanding: Basic knowledge of REST principles (endpoints, HTTP methods).
Steps
Design API Specification
OpenAPI Specification (Swagger): Use a tool like Swagger Editor to outline the following:
Endpoints: /posts, /posts/{id}, /categories, /authors, etc.
HTTP Methods: GET (retrieve), POST (create), PUT (update), DELETE
Create Boomi API Component
New API Component: Create a new API Component (Manage → API Management) within Boomi.
API Type: Select ‘Advanced’ for maximum flexibility.
Resources: Add resources that mirror your API endpoints.
Methods: Add the corresponding HTTP methods you’ll support for each resource.
Build Boomi Processes
GET Requests:
Create processes that fetch data from your database.
Use database connectors to execute appropriate queries.
POST Requests
Create processes that handle incoming data to create new blog posts.
Map JSON data from the API request to database fields.
PUT Requests
Create processes that modify existing blog posts.
Include logic to identify the post (e.g., by ID).
DELETE Requests
Create processes that delete blog posts.
Include logic to identify the post.
Implement Authentication and Authorization
Choose a Method: Basic Auth, OAuth 2.0, API Keys (consider the security level needed)
Boomi’s Capabilities: Utilize Boomi’s features to enforce security rules based on the chosen method.
Error Handling
HTTP Status Codes: Use appropriate status codes (e.g., 200 OK, 404 Not Found, 401 Unauthorized, 500 Internal Server Error).
JSON Error Responses: Provide informative error messages in a JSON structure.
API Deployment
Deploy API: Deploy your API component to a Boomi Atom or Molecule so it becomes accessible.
Obtain API Endpoint: Boomi will provide a base URL for your API.
API Documentation
Maintain Swagger Spec: Continue updating your OpenAPI Specification file throughout development.
Generate User-Friendly Docs: Use tools like Swagger UI to generate clear documentation from your Swagger file.
Example: GET /posts
A Boomi process would connect to the database, run a SELECT query, transform the result set into JSON, and return the list of blog posts.
Additional Considerations
Versioning: Design a strategy to manage API changes.
Rate Limiting: Prevent abuse by limiting requests per client.
Testing: Use Boomi’s testing tools or external services like Postman for thorough tests.
Oracle Boomi
youtube
You can find more information about Dell Boomi in this Dell Boomi Link
Conclusion:
Unogeeks is the No.1 IT Training Institute for Dell Boomi Training. Anyone Disagree? Please drop in a comment
You can check out our other latest blogs on Dell Boomi here – Dell Boomi Blogs
You can check out our Best In Class Dell Boomi Details here – Dell Boomi Training
Follow & Connect with us:
———————————-
For Training inquiries:
Call/Whatsapp: +91 73960 33555
Mail us at: [email protected]
Our Website ➜ https://unogeeks.com
Follow us:
Instagram: https://www.instagram.com/unogeeks
Facebook: https://www.facebook.com/UnogeeksSoftwareTrainingInstitute
Twitter: https://twitter.com/unogeek
0 notes
Text
Revolutionizing Web Development: Unleashing Speed and Efficiency with Python's FastAPI
Quick Summary:
FastAPI is a modern web framework of Python like flask, Django. It is mostly used for building RESTful APIs in Python. FastAPI is built on top of Starlette and Pydantic. It is one of the fastest web frameworks available for Python. It stands out due to its speed, automatic data validation, built-in support for asynchronous programming and the amazing part is, it has in-built swagger documentation for testing API's.
Let’s see what is API:
API stands for Application Programming Interface.
Here is the realistic example of APIs: Customer went to a restaurant and orders a food, and the waiter goes to the chef and gives the order details. In technical terms, client sends login request or any request to server through API's. API acts as a mediator between two software components to communicate with each other. It acts as a bridge between request and response.
History: FastAPI was created by Mexican guy Sebastian Ramirez and was first released in 2018. Because of fast execution of API operations, he named it FastAPI.
Features of FastAPI:
Fast to code
Very high performance
easy to use and learn
Based on OpenAPI for API creation
Great editor support
Minimize code duplication.
Asynchronous Server Gateway Interface (ASGI) support
In built swagger documentation
Installation:
Create a new project in vs code. Open terminal and give following commands to install FastAPI. As we know, pip is a package installer for Python. It is a tool that allows us to install and manage Python packages.
- pip install fastapi
2. We have to install ASGI server, that is uvicorn. So, whenever we make any changes in code, we don’t need reload uvicorn server again and again. Command to install uvicorn
- pip install "uvicorn[standard]"
Let’s create First Program:
In the code snippet, we imported the FastAPI class from the fastapi module we just installed.
App is the instance created inside main module. To run the file, hit command
uvicorn main:app --reload
(Where uvicorn is the server, main is filename and app is instance.)
The @app.get(“/”) is responsible for path operation, which is a decorator. It indicates that the below function is responsible for handling requests that is on “/” path using the get operation.
The get operation is one of the HTTP operations like Post, Put and Delete, etc.
The async function returns a dictionary.
Note: The difference between the async/await function and in a normal function is that, async function pauses while awaiting its results and let other such functions run in the meantime.
Once your application is running, open your web browser and navigate to http://127.0.0.1:8000. You should see the "Hello, World!" message.
Now go to http://127.0.0.1:8000/docs, you will see automatically generated API documentation provided by Swagger UI. It will look like this
Alternative API docs: go to http://127.0.0.1:8000/redoc You will see the alternative automatic documentation provided by ReDoc.
Path Parameters:
A path parameter is variable part of a URL path. It points to a specific resource location. Path parameters allow us to include values directly in the path of our URL. In the above code snippet -( @app.get("/")) is the path parameter.
Query Parameters:
Any parameters other than the path parameters are known query parameters. These are the common types of parameters. The query is set of key-value pairs that go after the '?' in a that URL, and it is separated by & characters.
Request Body:
When we have to send data from a client to API, we send it as a request body.
A request body is data sent by the client to API
To send data, you should use one of: POST , GET,PUT, DELETE or PATCH.
GET: This method is used to retrieve data from the server side. This is a read-only method.
POST: This method sends data to the server and creates a new resource.
PUT: This method is most often used to update an existing resource.
PATCH: This method is very similar to the PUT method because it also modifies an existing resource. The difference is that in put method, request body contains the complete new version, whereas in PATCH method, the request body only needs to contain the specific changes to the resource.
DELETE: The DELETE method is used to delete a resource.
Conclusion:
FastAPI is a newly added to Python web frameworks. Despite being new to the market, it is already gaining a grip in the developer’s group. The execution speed of async programming with Python’s easiness makes it different from another framework. Throughout the article, we touched on several topics essential to get you started with Fast API.
Credit – Priyanka Divekar
MetricsViews Pvt. Ltd.
MetricsViews specializes in building a solid DevOps strategy with cloud-native including AWS, GCP, Azure, Salesforce, and many more. We excel in microservice adoption, CI/CD, Orchestration, and Provisioning of Infrastructure - with Smart DevOps tools like Terraform, and CloudFormation on the cloud. www.metricsviews.com
0 notes
Text
Updating openapi specification with swagger editor

UPDATING OPENAPI SPECIFICATION WITH SWAGGER EDITOR HOW TO
UPDATING OPENAPI SPECIFICATION WITH SWAGGER EDITOR UPDATE
If you are editing a non-current revision of an API, you cannot change the following properties: Name.
UPDATING OPENAPI SPECIFICATION WITH SWAGGER EDITOR UPDATE
IBM API Connect is a modern API management solution for creating, running, managing and securing APIs for external and internal consumers to accelerate an organization’s API Program and capture new revenue through compelling new customer experiences. You can update your backbend API from the Azure portal by following these steps: Select All operations. Before jumping into the details, let’s step back and understand what is API Connect and what does it offer? It’s easy-to-learn, language agnostic, and both human and machine readable.įor this post, you will create an API for a telecom provider to GET billing details. The specification creates a RESTful interface for easily developing and consuming an API by effectively mapping all the resources and operations associated with it. SwaggerHub supports OpenAPI 3.0 for API design and documentation. OpenAPI 3.0 introduces many new features, including multiple servers, callbacks, links, better content negotiation, new authentication types, and more. The OpenAPI specification (formerly known as the Swagger Specification) is a powerful definition format to describe RESTful APIs. OpenAPI 3.0 (OAS3) is the latest version of the OpenAPI Specification (formerly known as Swagger Specification). Note: The OpenAPI – Swagger 2.0 specification generated (in YAML) through this post is used for IBM Mobile Foundation Adapter generation, which will be discussed in a later post. Visual Editor is fully synchronized with the Code Editor. SwaggerHub provides Visual Editor for OpenAPI 2.0 and OpenAPI 3.0 definitions so that you can update your API information without having to understand the YAML syntax.
UPDATING OPENAPI SPECIFICATION WITH SWAGGER EDITOR HOW TO
In this post, you will learn how to model and generate an OpenAPI (swagger 2.0) specification using API Connect on IBM Cloud.Also, you will be drafting, securing and publishing an API talking to a NoSQL database in this case Cloudant. Available in SwaggerHub SaaS, SwaggerHub On-Premise 1.20.0 and later. Modelling OpenAPI – Swagger 2.0 Specification using API Connect

0 notes
Text
ABAP and Swagger/OpenAPI
Swagger Swagger is a set of tools for creating, generating, documenting, and testing RESTful services. It is centered around a specification file(https://swagger.io/specification/), which contains the description of the REST services, much like a SOAP WSDL or OData metadata file. There are many powerful tools in the Swagger family, which all are open source: * Editor * UI * Inspector These tools are free and works in the browser. SAP also use Swagger as part of API management. ABAP A while ago I started building a tool for integrating ABAP and Swagger using an inside-out approach. Lets jump right into it and see how it works, suppose I want to expose the methods of the following class as REST services: CLASS zcl_todo DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. METHODS create IMPORTING is_data TYPE ztodo_data RETURNING VALUE(rs_key) TYPE ztodo_key . METHODS delete IMPORTING is_key TYPE ztodo_key . METHODS list RETURNING VALUE(rt_list) TYPE ztodo_tt . METHODS update IMPORTING iv_guid TYPE ztodo_key-guid is_data TYPE ztodo_data . ENDCLASS. CLASS ZCL_TODO IMPLEMENTATION. METHOD create. DATA: ls_todo TYPE ztodo. TRY. rs_key-guid = cl_system_uuid=>if_system_uuid_static~create_uuid_c22( ). CATCH cx_uuid_error. ASSERT 0 = 1. ENDTRY. MOVE-CORRESPONDING rs_key TO ls_todo. MOVE-CORRESPONDING is_data TO ls_todo. INSERT ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. METHOD delete. DELETE FROM ztodo WHERE guid = is_key-guid. ASSERT sy-subrc = 0. ENDMETHOD. METHOD list. SELECT * FROM ztodo INTO TABLE rt_list. "#EC CI_NOWHERE ENDMETHOD. METHOD update. DATA: ls_todo TYPE ztodo. ls_todo-guid = iv_guid. MOVE-CORRESPONDING is_data TO ls_todo. UPDATE ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. ENDCLASS. Interface ZIF_SWAG_HANDLER must be implemented, and metadata added for the methods to be exposed, METHOD zif_swag_handler~meta. FIELD-SYMBOLS: LIKE LINE OF rt_meta. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'List'(001). -url-regex = '/list$'. -method = zcl_swag=>c_method-get. -handler = 'LIST'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Create'(002). -url-regex = '/create$'. -method = zcl_swag=>c_method-post. -handler = 'CREATE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Delete'(003). -url-regex = '/delete$'. -method = zcl_swag=>c_method-post. -handler = 'DELETE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Update'(004). -url-regex = '/update/(w+)$'. APPEND 'IV_GUID' TO -url-group_names. -method = zcl_swag=>c_method-post. -handler = 'UPDATE'. ENDMETHOD. Add the handler to a custom SICF node, and thats about it! ABAP-Swagger will automatically generate a spec from the method definitions, and it is possible to use the Swagger UI to test the services. ABAP-Swagger is open source and works from 702 and up. The full example can be found at https://github.com/larshp/todo_logic Find more Open Source ABAP projects on dotabap.org ABAP is like the sun, it will keep shining for a million years http://bit.ly/2F0KrFM #SAP #SAPCloud #AI
0 notes
Text
ABAP and Swagger/OpenAPI
Swagger Swagger is a set of tools for creating, generating, documenting, and testing RESTful services. It is centered around a specification file(https://swagger.io/specification/), which contains the description of the REST services, much like a SOAP WSDL or OData metadata file. There are many powerful tools in the Swagger family, which all are open source: * Editor * UI * Inspector These tools are free and works in the browser. SAP also use Swagger as part of API management. ABAP A while ago I started building a tool for integrating ABAP and Swagger using an inside-out approach. Lets jump right into it and see how it works, suppose I want to expose the methods of the following class as REST services: CLASS zcl_todo DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. METHODS create IMPORTING is_data TYPE ztodo_data RETURNING VALUE(rs_key) TYPE ztodo_key . METHODS delete IMPORTING is_key TYPE ztodo_key . METHODS list RETURNING VALUE(rt_list) TYPE ztodo_tt . METHODS update IMPORTING iv_guid TYPE ztodo_key-guid is_data TYPE ztodo_data . ENDCLASS. CLASS ZCL_TODO IMPLEMENTATION. METHOD create. DATA: ls_todo TYPE ztodo. TRY. rs_key-guid = cl_system_uuid=>if_system_uuid_static~create_uuid_c22( ). CATCH cx_uuid_error. ASSERT 0 = 1. ENDTRY. MOVE-CORRESPONDING rs_key TO ls_todo. MOVE-CORRESPONDING is_data TO ls_todo. INSERT ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. METHOD delete. DELETE FROM ztodo WHERE guid = is_key-guid. ASSERT sy-subrc = 0. ENDMETHOD. METHOD list. SELECT * FROM ztodo INTO TABLE rt_list. "#EC CI_NOWHERE ENDMETHOD. METHOD update. DATA: ls_todo TYPE ztodo. ls_todo-guid = iv_guid. MOVE-CORRESPONDING is_data TO ls_todo. UPDATE ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. ENDCLASS. Interface ZIF_SWAG_HANDLER must be implemented, and metadata added for the methods to be exposed, METHOD zif_swag_handler~meta. FIELD-SYMBOLS: LIKE LINE OF rt_meta. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'List'(001). -url-regex = '/list$'. -method = zcl_swag=>c_method-get. -handler = 'LIST'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Create'(002). -url-regex = '/create$'. -method = zcl_swag=>c_method-post. -handler = 'CREATE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Delete'(003). -url-regex = '/delete$'. -method = zcl_swag=>c_method-post. -handler = 'DELETE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Update'(004). -url-regex = '/update/(w+)$'. APPEND 'IV_GUID' TO -url-group_names. -method = zcl_swag=>c_method-post. -handler = 'UPDATE'. ENDMETHOD. Add the handler to a custom SICF node, and thats about it! ABAP-Swagger will automatically generate a spec from the method definitions, and it is possible to use the Swagger UI to test the services. ABAP-Swagger is open source and works from 702 and up. The full example can be found at https://github.com/larshp/todo_logic Find more Open Source ABAP projects on dotabap.org ABAP is like the sun, it will keep shining for a million years http://bit.ly/2F3JR9n #SAP #SAPCloud #AI
0 notes
Text
ABAP and Swagger/OpenAPI
Swagger Swagger is a set of tools for creating, generating, documenting, and testing RESTful services. It is centered around a specification file(https://swagger.io/specification/), which contains the description of the REST services, much like a SOAP WSDL or OData metadata file. There are many powerful tools in the Swagger family, which all are open source: * Editor * UI * Inspector These tools are free and works in the browser. SAP also use Swagger as part of API management. ABAP A while ago I started building a tool for integrating ABAP and Swagger using an inside-out approach. Lets jump right into it and see how it works, suppose I want to expose the methods of the following class as REST services: CLASS zcl_todo DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. METHODS create IMPORTING is_data TYPE ztodo_data RETURNING VALUE(rs_key) TYPE ztodo_key . METHODS delete IMPORTING is_key TYPE ztodo_key . METHODS list RETURNING VALUE(rt_list) TYPE ztodo_tt . METHODS update IMPORTING iv_guid TYPE ztodo_key-guid is_data TYPE ztodo_data . ENDCLASS. CLASS ZCL_TODO IMPLEMENTATION. METHOD create. DATA: ls_todo TYPE ztodo. TRY. rs_key-guid = cl_system_uuid=>if_system_uuid_static~create_uuid_c22( ). CATCH cx_uuid_error. ASSERT 0 = 1. ENDTRY. MOVE-CORRESPONDING rs_key TO ls_todo. MOVE-CORRESPONDING is_data TO ls_todo. INSERT ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. METHOD delete. DELETE FROM ztodo WHERE guid = is_key-guid. ASSERT sy-subrc = 0. ENDMETHOD. METHOD list. SELECT * FROM ztodo INTO TABLE rt_list. "#EC CI_NOWHERE ENDMETHOD. METHOD update. DATA: ls_todo TYPE ztodo. ls_todo-guid = iv_guid. MOVE-CORRESPONDING is_data TO ls_todo. UPDATE ztodo FROM ls_todo. ASSERT sy-subrc = 0. ENDMETHOD. ENDCLASS. Interface ZIF_SWAG_HANDLER must be implemented, and metadata added for the methods to be exposed, METHOD zif_swag_handler~meta. FIELD-SYMBOLS: LIKE LINE OF rt_meta. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'List'(001). -url-regex = '/list$'. -method = zcl_swag=>c_method-get. -handler = 'LIST'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Create'(002). -url-regex = '/create$'. -method = zcl_swag=>c_method-post. -handler = 'CREATE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Delete'(003). -url-regex = '/delete$'. -method = zcl_swag=>c_method-post. -handler = 'DELETE'. APPEND INITIAL LINE TO rt_meta ASSIGNING . -summary = 'Update'(004). -url-regex = '/update/(w+)$'. APPEND 'IV_GUID' TO -url-group_names. -method = zcl_swag=>c_method-post. -handler = 'UPDATE'. ENDMETHOD. Add the handler to a custom SICF node, and thats about it! ABAP-Swagger will automatically generate a spec from the method definitions, and it is possible to use the Swagger UI to test the services. ABAP-Swagger is open source and works from 702 and up. The full example can be found at https://github.com/larshp/todo_logic Find more Open Source ABAP projects on dotabap.org ABAP is like the sun, it will keep shining for a million years http://bit.ly/2EXnJgN #SAP #SAPCloud #AI
0 notes