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

issues with spring data rest and @ManyToOne relationships #792

Closed
david-schneider-mpf opened this issue Jul 20, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@david-schneider-mpf
Copy link

Describe the bug
for relationships like /property/{id}/childProperty, spring doc does not correctly describe the url, http methods or json

To Reproduce
see:

https://github.com/david-schneider-mpf/springdoc-data-rest

the README lists the major issues

Expected behavior
for such a relationship, the url should already have the child property name filled in
only the http methods supported by spring data rest should be displayed
links should be named correctly

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@bnasslahsen
Copy link
Contributor

@david-schneider-mpf,

Thank you for your feedback and your analysis.
The main points are now addressed. You can test with the latest SNAPSHOT.

For the links naming, it comes from the structure fo org.springframework.hateoas.Link. The generated structure looks more verbose.. But generated representation of the schema is correct.

@marcel-steinbach-mpf
Copy link

marcel-steinbach-mpf commented Sep 8, 2020

@bnasslahsen, thanks for the update.

There's still an issue with the property naming, where references are listed not with the correct name. SpringDoc lists it with the type name, instead of the reference name.

E.g.

    @ManyToOne
    @JoinColumn(name = "child_property_id")
    private ChildProperty myChildPropertyName;

should be:

    "/properties/{id}/myChildPropertyName": {

but is:

    "/properties/{id}/childProperty": {

See https://github.com/marcel-steinbach-mpf/springdoc-data-rest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants