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

fix!: generate and load openapi.json to/from build dir root in dev mode #2163

Merged
merged 13 commits into from
Mar 13, 2024

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Mar 1, 2024

  • This moves the location of generating and loading openapi.json file
    to the root of build dir in dev mode to prevent unwanted restarts
    being triggered by Spring devtools.

  • In production mode, however, the openapi.json is generated to and
    loaded from the root of the classes dir to keep it available for the
    runtime to load it as a resource.

  • This renames the openapi.json file to hilla-openapi.json and no
    longer puts it under any package.

Fixes #842

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.78%. Comparing base (91255b9) to head (8371a49).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2163   +/-   ##
=======================================
  Coverage   93.78%   93.78%           
=======================================
  Files          64       64           
  Lines        1624     1624           
  Branches      365      365           
=======================================
  Hits         1523     1523           
  Misses         66       66           
  Partials       35       35           
Flag Coverage Δ
unittests 93.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* This moves the location of generating and loading openapi.json file
to the root of build dir in dev mode to prevent unwanted restarts
being triggered by Spring devtools.

* In production mode, however, the openapi.json is generated to and
loaded from the root of the classes dir to keep it available for the
runtime to load it as a resource.

Fixes #842
@taefi taefi changed the title fix: Put hilla-openapi.json outside classes fix!: generate and load openapi.json to/from build dir root in dev mode Mar 12, 2024
@taefi taefi marked this pull request as ready for review March 12, 2024 23:07
@taefi taefi requested a review from cromoteca March 13, 2024 08:43
@taefi taefi marked this pull request as draft March 13, 2024 09:59
@taefi taefi marked this pull request as ready for review March 13, 2024 13:45
Copy link

sonarcloud bot commented Mar 13, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@taefi taefi enabled auto-merge (squash) March 13, 2024 14:05
@taefi taefi merged commit 1e36071 into main Mar 13, 2024
15 checks passed
@taefi taefi deleted the hilla-openapi-in-build branch March 13, 2024 14:06
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Hilla 24.4.0.alpha14 and is also targeting the upcoming stable 24.4.0 version.

cromoteca pushed a commit that referenced this pull request Mar 14, 2024
…de (#2163)

* fix: Put hilla-openapi.json outside classes

Fixes #842

* fix!: generate and load openapi.json to/from build dir root in dev mode

* This moves the location of generating and loading openapi.json file
to the root of build dir in dev mode to prevent unwanted restarts
being triggered by Spring devtools.

* In production mode, however, the openapi.json is generated to and
loaded from the root of the classes dir to keep it available for the
runtime to load it as a resource.

Fixes #842

---------
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Applications restart on startup
4 participants