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

MODELIX-949: media type versioning + branch meta data access #862

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

languitar
Copy link
Contributor

@languitar languitar commented Jun 27, 2024

This PR adds a new media type for requesting branch metadata as the first test case to prepare for media-type versioning. To achieve this versioning the scheme, the PR modifies the openapi-generator templates so that one can optionally declare separate handler methods per media type(s) to generate in the API interface.

This PR also adds kotest-assertions and therefore closes MODELIX-795

To be verified by reviewers

  • Relevant public API members have been documented
  • Documentation related to this PR is complete
    • Boundary conditions are documented
    • Exceptions are documented
    • Nullability is documented if used
  • Touched existing code has been extended with documentation if missing
  • Code is readable
  • New features and fixed bugs are covered by tests

Copy link
Contributor

@odzhychko odzhychko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

  • The Content-Type of the response is automatically set to the selected Accept value.
  • The Content-Type can be overridden when custom logic is needed.
  • Serialization works with the content type.

@languitar languitar force-pushed the feature/media-type-versioning branch 2 times, most recently from dec8323 to 66e49ee Compare July 2, 2024 13:42
@languitar languitar changed the title MODELIX-949: media type versioning MODELIX-949: media type versioning + branch meta data access Jul 2, 2024
@languitar languitar force-pushed the feature/media-type-versioning branch from 66e49ee to 49751fb Compare July 2, 2024 13:44
@languitar languitar marked this pull request as ready for review July 2, 2024 13:45
@languitar languitar requested review from slisson and a team as code owners July 2, 2024 13:45
@languitar languitar requested a review from odzhychko July 2, 2024 13:48
Copy link
Contributor

github-actions bot commented Jul 2, 2024

JVM coverage report

Overall Project 51.39%
Files changed 95.56% 🍏

File Coverage
ModelReplicationServer.kt 90.42% -0.05% 🍏
Main.kt 14.41% -0.29%

Copy link
Contributor

github-actions bot commented Jul 2, 2024

Test Results

141 files  141 suites   10m 59s ⏱️
850 tests 841 ✅ 9 💤 0 ❌
860 runs  851 ✅ 9 💤 0 ❌

Results for commit 2abc6b0.

♻️ This comment has been updated with latest results.

This adds a new media type for requesting branch metadata. The commit
also prepares the openapi-generator templates to support media-type
versioning by optionally being able to declare separate handler methods
per media type. For registering types for JSON serialization, the model
needs to be annotated with the intended media type via the
x-modelix-media-type vendor extension.
@languitar languitar force-pushed the feature/media-type-versioning branch from 49751fb to 2abc6b0 Compare July 2, 2024 14:26
@languitar languitar enabled auto-merge July 2, 2024 14:32
@languitar languitar merged commit 92ce337 into main Jul 2, 2024
18 checks passed
@languitar languitar deleted the feature/media-type-versioning branch July 2, 2024 14:38
@slisson
Copy link
Member

slisson commented Jul 3, 2024

🎉 This PR is included in version 8.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants