Intro :- Often in REST adapter scenario , we are given with YAML files , where multiple json operations are tagged. In those cases , we need to understand which json /operation to be needed for our scenario  and how to create XSD from YAML file provided.

Yaml is a multi structure format of JSON file(s).

XSD is a structure format of XML file

Step 1. :- Use Swagger Editor and put the YAML file structure.

Example YAML file

Use The Swagger application link below. – https://editor.swagger.io/

Step 2:- Put the Yaml file in the swagger editor left hand side  and in the right hand side , all the relevant functions/operations are displayed.

 

 

Step3:-Choose the right operation which you want to create as XSD. After choosing the right operation the relevant json example/model is displayed.

Step 4 :-  Use the below link to convert the json example to xml

https://www.freeformatter.com/json-to-xml-converter.html

 

Step 5:- Convert the created xml to xsd using the link below.

https://www.freeformatter.com/json-to-xml-converter.html

Step 6 :- Validate this structure against the model provided by operation in the Swagger editor and check if the occurrences, datatypes , names etc are matching . Mostly occurrences do not match , as model depicts the complete json structure, whereas json example is a subset of it. Validate against the model and create / edit the xsd created above with modification done manually.

Step7 :- Import the XSD into ESR for usage.

 

Summary :- This piece of blog would help us understand what is YAML , json about different file formats and how this could be adpative into the PI/PO ESR mappings.

 

Please share your comments and insights on this. Thanks.

Refer-SAP Integration Suite environment Topic page https://community.sap.com/topics/integration-suite for more suitable posts.

 

1 Comment
Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x