Skip to content
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

Swagger generation includes unexpected fields: attributes and relationships #3229

Closed
bladedancer opened this issue Jun 5, 2024 · 0 comments · Fixed by #3230
Closed

Swagger generation includes unexpected fields: attributes and relationships #3229

bladedancer opened this issue Jun 5, 2024 · 0 comments · Fixed by #3230

Comments

@bladedancer
Copy link
Contributor

When generating the swagger docs I'm seeing additional fields for attributes and relationships in the generated models. e.g.

image

The properties correctly have the structure but there are also two additional unexpected objects "attributes" and "relationships".

Expected Behavior

The generated swagger for the models should not have top level objects attributes & relationships.

Possible Solution

The problem would appear to be here in Resource.java
https://github.com/yahoo/elide/blob/master/elide-swagger/src/main/java/com/yahoo/elide/swagger/models/media/Resource.java#L49

This class is serialize when generating the the Swagger and the fact that the attributes and relationships have getters means they're visible to the jackson serialization. They should either have ignore annotations or if not used (haven't checked) then they shoudl be removed.

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 a pull request may close this issue.

1 participant