Skip to content

Deeply nested objects #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
braktar opened this issue Jul 16, 2019 · 1 comment
Open

Deeply nested objects #751

braktar opened this issue Jul 16, 2019 · 1 comment

Comments

@braktar
Copy link
Contributor

braktar commented Jul 16, 2019

The model we use for our API is strongly nested, we are working in Vehicle Routing Optimization and define a complex model in a single request. There are multiple high level objects such as
Services (missions to perform within a route) and Points (coordinates or matrix reference)

Within those objects are others objects
an Activity for Services which have a mission to perform or Activities, if we have alternatives available to perform a delivery.

Points have a single object below, which is the location (lat/lon)

The model is correctly validated with grape and works like a charm at this purpose.
But the generation of the documentation through grape-swagger generate some incorrect types

Location should be an hash, but is displayed as an array of hash.
Skills related to Services are displayed as String and should be array of string
Activity is displayed as an array of hash, and should be a single hash.
Activities are correctly displayed as an array of hash.

Please see the related pull request which display the errors.
Has anyone any hints on how I could to solve it or by my side, or by contributing if the bug is confirmed ?

@braktar
Copy link
Contributor Author

braktar commented Aug 1, 2019

By the way, it seems related to the following issues :
#628 and #666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant