AEM forms 6.3 data integration swagger

Avatar

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
James_R_Green
Level 5

07-09-2018

Hi,

I have configured data integration using a swagger (Json) file. In this file the endpoints are defined and also the fields.

This works just fine for fields that are of type string, numeric  However the swagger file I am using describes nested objects E. G.

Object1

     StringField1

     StringField2

     Object2

          StringField3

          StringField4

          StringField5

the fields for object1 are correctly identified by AEM. Object2 and its fields are ignored.

If I restructure the swagger file so they objects are not nested aem processes it correctly :

Object1

    StringField1

    StringField2

Object2

          StringField3

          StringField4

          StringField5

Does AEM support this nested object structure in swagger? If so do you have an example swagger file that demonstrates the correct syntax.

If not, what is the alternative? Add a key to each data structure and link them?

Thanks,

James

Accepted Solutions (1)

Accepted Solutions (1)

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

11-09-2018

Hi James,

I checked Internally and the parsing API provided by Swagger has a limitation with nested inline objects. Please try to create an inline definition for the nested object Object2 and use $ref to refer to the definition from Object1.

[1] Using $ref | Swagger

Answers (2)

Answers (2)

Avatar

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Boost 50
Level 5
James_R_Green
Level 5

Likes

52 likes

Total Posts

191 posts

Correct reply

47 solutions
Top badges earned
Boost 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
James_R_Green
Level 5

11-09-2018

Many thanks Mayank.

I tried the same thing earlier and it works, good to know it is the recommended approach.

The example I found was in the petstore swagger example:

https://petstore.swagger.io/v2/swagger.json

Search for Category

Thanks,

James

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

11-09-2018

Hi James,

Good to know that it's resolved now.