Ready-made Vs Tailor-made fields in OpenAPI definitions: Part 1

An OpenAPI catalog for WSO2 APIM and Micro-gateway 320

Image for post
Image for post
[Source: https://45.media.tumblr.com/59ce12f2973199e5042f9d3e07bd2e49/tumblr_o4seodEyWn1s3olk1o1_540.gif]

If you don’t fit into the box, then fix the box to fit yourself in!

Spotlight on OpenAPI Vendor extensions

Image for post
Image for post
[Source: https://newmanvantage.com/content/images/2019/02/sponge.jpg]

Vendor extensions on the action!

Image for post
Image for post
[Source: https://i.imgflip.com/1ip4rl.jpg]
x-
x-proprietor 

Rules on defining the vendor extensions

Image for post
Image for post
[Source: https://s3.amazonaws.com/lowres.cartoonstock.com/politics-pedestrian-crossing-barrier-government-regulation-wmi100305_low.jpg]
1. info
2. paths (individual paths and operations)
3. operation parameters
4. responses
5. tags
6. security schemes
1. Primitive
2. Array
3. Object or null
E.g:
x-wso2-production-endpoints:
urls:
- "https://test.com/bank/accounts"
type: "https"

WSO2 and OpenAPI vendor extensions

Image for post
Image for post
[Source: https://miro.medium.com/max/800/1*6QNc3-7ULpW6hJfIEShh2Q.jpeg]
x-wso2
1. Throttling
2. Endpoints
3. CORS
4. Transports
5. Mutual SSL
6. Cache
7. Security and etc.

OpenAPI storage locations and the differences: WSO2 APIM and MGW

Image for post
Image for post
[Source: https://static.wikia.nocookie.net/tomandjerry/images/4/46/JerryJumbo3-1-.jpg/revision/latest?cb=20110131171722]

1. WSO2 APIM

/_system/governance/apimgt/applicationdata/provider/<provider>/<API Name>/<version>/swagger.json
<APIM-HOME>/repository/deployment/server/synapse-configs/default/local-entries/<API-ID.xml>
1. Publisher portal (or the API definition that could be retrieved via REST API)
2. Registry
3. Local-entries
API Definition in,
1. Registry = Local-entries
2. Publisher portal = REST API
x-wso2-application-security
x-wso2-auth-header
x-wso2-cors
x-wso2-production-endpoints
x-wso2-sandbox-endpoints
x-wso2-basePath
x-wso2-transports
x-wso2-response-cache
x-wso2-owner
swagger-carbon-management-console.json
9b9beae0–9307–40fb-b7be-b0f394fdadd9.xml

2. WSO2 Microgateway

Coming up Next…!

Image for post
Image for post
[Source: https://res.cloudinary.com/trackingboard/image/upload/t_w780/FROM-FROALA-a91ca7c3]

References

Written by

Inquisitive

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store