question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong hateoas relation

See original GitHub issue

I’ve added springdoc-openapi-data-rest dependency (v1.3.2) to my project based on spring boot 2.2.6.RELEASE and hateoas relation in response are changed from: { "_embedded" : { "entityNameList" : [ {...}] } to: { "_embedded" : { "entityName" : [ {...}] }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bnasslahsencommented, May 17, 2020

Starting from the next release v1.3.10, the projects that rely on spring-hateoas only, can use:

  • The new dependency springdoc-openapi-hateoas so they won’t have to exclude evo-inflector jar.
		<dependency>
			<groupId>org.springdoc</groupId>
			<artifactId>springdoc-openapi-hateoas</artifactId>
			<version>${springdoc.version}</version>
		</dependency>

The projects that rely on spring-data-rest can keep using springdoc-openapi-data-rest. This enhancement will not be a breaking change, as springdoc-openapi-data-rest will depend on springdoc-openapi-hateoas.

Any project that was already using springdoc-openapi-data-rest dependency can keep using it.

0reactions
bnasslahsencommented, May 9, 2020

@davidepedone and @valentinabojan,

Thank you for your feedback. I guess, for projects relying only spring-hateoas and not on spring-data-rest-core, it would be useful to update the documentation to exclude evo-inflector.

The ideal would be to split springdoc-openapi-data-rest into two modules which will make the integration easier for spring-hateos projects:

  • One module for spring-hateos
  • And another module for spring-data-rest
Read more comments on GitHub >

github_iconTop Results From Across the Web

HATEOAS links are wrong if using JsonSubTypes
I am using spring data rest with Mongo to expose a class with multiple subtypes. When I do this, HATEOAS is compartmentalizing the...
Read more >
Spring HATEOAS - Reference Documentation
Spring HATEOAS lets you work with links through its immutable Link value type. Its constructor takes both a hypertext reference and a link ......
Read more >
Modifying one-to-many relationships with HATEOAS
A few options I have envisaged are: 1) Post back the HATEOAS data intact, with the href modified to point to the new...
Read more >
An Intro to Spring HATEOAS - Baeldung
This article explains the process of creating hypermedia-driven REST web service using the Spring HATEOAS project.
Read more >
HATEOAS Driven REST APIs
The hyperlink represents an operation you can do on the resource, not the resource itself. The employees relation is a bad example, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found