Skip to content

Deeply nested objects #752

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

Merged
merged 18 commits into from
Aug 6, 2019
Merged

Deeply nested objects #752

merged 18 commits into from
Aug 6, 2019

Conversation

braktar
Copy link
Contributor

@braktar braktar commented Jul 16, 2019

Related to: #751

@braktar braktar changed the title Depply nested objects Deeply nested objects Jul 16, 2019
@braktar
Copy link
Contributor Author

braktar commented Jul 31, 2019

A bit of progress on my side. My nested objects have the correct type/format which is encouraging.

@coveralls
Copy link

coveralls commented Jul 31, 2019

Coverage Status

Coverage increased (+0.008%) to 99.33% when pulling e8ccbc0 on braktar:deeplynested into 7237ef3 on ruby-grape:master.

@braktar
Copy link
Contributor Author

braktar commented Jul 31, 2019

I've also added a nested object with Array[Array[String]] which is currently restitute as Array[String]

@grape-bot
Copy link

grape-bot commented Aug 5, 2019

1 Warning
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#752](https://github.com/ruby-grape/grape-swagger/pull/752): Deeply nested objects - [@braktar](https://github.com/braktar).

Generated by 🚫 danger

@braktar
Copy link
Contributor Author

braktar commented Aug 5, 2019

So, maybe a bit of explanation.

MoveParams was following the formData structure in order to build the definition, losing a lot of information useful for the body format.

So instead of it, the definition is now build with the body format (without losing information) and is then modified only if the formData is required.

I've currently removed the vehicle test as I don't see what is the correct way to read an array[array[string]] as well as the output expected for it.

@LeFnord
Copy link
Member

LeFnord commented Aug 6, 2019

thanks @braktar … good job

@LeFnord LeFnord merged commit 445d2d4 into ruby-grape:master Aug 6, 2019
aka-momo pushed a commit to aka-momo/grape-swagger that referenced this pull request Feb 8, 2023
* Depply nested objects

* Simple hash syntax edit

* Nested objects are not necessary arrays

* fix points test

* Fix test services

* Doesn't require to delete hash or array properties

* Edit nested logic

* Add vehicle test

* Change parameter level is endpoint job

* Array body shouldn't lost array type

* no more parser role

* array of array to array of string

* move format data

* fix formdata return

* Moved params_parser role spec

* Move endpoint spec

* Revert "Add vehicle test"

This reverts commit e5ba63b.

* remove redundant interpolation
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

Successfully merging this pull request may close these issues.

4 participants