Skip to content

Commit

Permalink
fix: only enable fqn in openapi when needed, regenerate the api types
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Jul 16, 2024
1 parent b8d429b commit 859bb9e
Show file tree
Hide file tree
Showing 4 changed files with 3,145 additions and 5,174 deletions.
5 changes: 3 additions & 2 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ spring:
graphiql:
enabled: true

springdoc:
use-fqn: true
# Enable this if you want to regenerate the frontend types
#springdoc:
# use-fqn: true

management:
tracing:
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/types/backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The index.ts in this folder contains all necessary types for the backend communication, generated from an openapi spec.

To generate a new version of the types:
* first enabled fully qualified names in the backend (control + f "springdoc" -> comment in)
* then save http://localhost:8080/v3/api-docs/combined to `api.json`
* format with prettier
* run `node createApi.js` to generate the types
* format index.ts with prettier
Loading

0 comments on commit 859bb9e

Please sign in to comment.