Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

how to generate swagger definition file using json/json schema

Avatar

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
jhansi_lakshmik
Level 1

11-07-2019

Hi,

Do we have any procedure to convert simple json file example in to swagger definition file ,if so could any one suggest the way

Example :simple json

{

  "Level1": [

    {

      "level2": "AB",

      "level3": {

        "ABS1": [ABSC1","ABSC2" ],

        "ABS2": ["ABS2C1" ]     }

    },

    {

      "level2": "AD",

      "level3": {"ADS1": ["ADSC1",  "ADSC2"],

        "ADS2": [ "ADS2C1","ADS2C2","ADS2C3" ]}

    }

  ]

}

Thanks in advance,

Jhansi.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

12-07-2019

The Best APIs are Built with Swagger Tools | Swagger

Once you have your swagger file, you can then create datasource in AEM Forms

Adobe Experience Manager Help | Creating DataSource Configuration in AEM Forms

BTW Swagger files describe REST API that want to invoke from AEM Forms. Swagger files are like WSDL files which are for SOAP protocol

Answers (5)

Answers (5)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

12-07-2019

you can use YAML file to create datasource

Avatar

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
jhansi_lakshmik
Level 1

12-07-2019

Thanks for the prompt response , do we have any documentation on how to use YAML file to create a datasource, if documentation is not available  any insights  of this scenario would be great.

Avatar

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
jhansi_lakshmik
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
jhansi_lakshmik
Level 1

12-07-2019

Hi Mayank Gandhi,

Thanks for the response, i have converted the sample JSON to JSON schema and to YAML, i believe its needed to convert this YAML file to swagger definition file  so that i can create data source to use the sample json , any insights post conversion of json to YAML and how to make swagger from YAML would be great.

Thanks in advance,

Jhansi

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

12-07-2019

Convert the JSON to JSON schema which can be ported to YAML thereafter.

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

11-07-2019

Swagger file is in json format

what are you trying to accomplish?