1

We have a Spring Data Rest project producing HAL JSON. We would like to automatically produce a JavaScript Client API based on the HAL JSON. We can very simply convert OpenAPI JSON to a JS Client API using OpenAPITools/openapi-generator, but we have been unable to find a similar tool for HAL JSON. As a workaround, we are exploring converting HAL JSON to OpenAPI JSON in order to leverage the OpenAPITools/openapi-generator project.

Does a HAL JSON to OpenAPI JSON converter exist?

Is there a HAL JSON to JavaScript Client API generator?

Is there a way to skip the HAL JSON step and produce OpenAPI JSON from Spring Data Repository classes?

KevinB
  • 1,102
  • 2
  • 8
  • 19

1 Answers1

0

To enable the support of spring-data-rest types: @RepositoryRestResource and QuerydslPredicate annotations, you should use:

<dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-data-rest</artifactId>
      <version>1.4.8</version>
</dependency> 

And you have demos available here:

brianbro
  • 4,141
  • 2
  • 24
  • 37