Skip to content

Merge multiple OpenAPI definitions#708

Draft
cbarlin wants to merge 4 commits intoavaje:masterfrom
cbarlin:read_dependencies
Draft

Merge multiple OpenAPI definitions#708
cbarlin wants to merge 4 commits intoavaje:masterfrom
cbarlin:read_dependencies

Conversation

@cbarlin
Copy link
Contributor

@cbarlin cbarlin commented Jan 12, 2026

Resolves #51

I've marked this as draft in case you want to change the approach taken, and because I've yet to fully finish the testing. The remaining changes are:

  • Add another tests module that builds off of test-javalin-jsonb so we can check it correctly pulls in from libraries
  • Adjust the github pipelines to ensure that the plugin is being used

I'm also not sure if this should be a separate goal or just part of the existing one.

I was also thinking possibly (as a second PR) of moving the json serialisation of the OpenAPI spec to a library, and the http-generator-core can use that to serialise/deserialise

Another thing I thought of as I was working on this is that this change works for libraries that have OpenAPI definitions, but not for ones in which there's no javadoc available for the annotation processor to parse... Is it worth adding the ability to parse Schema annotations as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running this through a semantic diff tool, there is a bunch of added exampleSetFlag items, and the description items from the moar-openapi.json file above.

@cbarlin
Copy link
Contributor Author

cbarlin commented Jan 19, 2026

So with the layout of the tests right now, the only way to test the plugin is to either release or install the plugin, and then run the tests with that version. The latter means that we can get rid of the separate test for the plugin and change the instructions for the main tests to cd ./openapi-maven-plugin && mvn install && cd .. && <existing instructions> but then means that the committed tests has to reference an installed snapshot and/or reference a version that hasn't been released, neither of which are great. If it's released without testing, that's not great either.

We could restructure the plugin so it's part of the same versioning and parent pom as the other items in the repository, like the avaje-inject plugin is - that would probably cause the least amount of change?

Any thoughts? I'm going on holidays at the end of this week so won't be able to do anything after that.

@SentryMan SentryMan requested a review from rbygrave January 19, 2026 16:56
@cbarlin
Copy link
Contributor Author

cbarlin commented Feb 13, 2026

@rbygrave I'm still on holidays but will be back soon. What are your thoughts on making the plugin versioned alongside the rest of the project?

We can then also spin the jsonb stuff for the OpenAPI schema into a seperate module and then the http-generator-core can use it too.

@rbygrave
Copy link
Contributor

This PR is still DRAFT per se ... but yeah I'm pretty happy with it.

What are your thoughts on making the plugin versioned alongside the rest of the project?

Maybe sort out this PR first?

We can then also spin the jsonb stuff for the OpenAPI schema into a seperate module and then the http-generator-core can use it too.

Yes, could be a good followup.

@cbarlin
Copy link
Contributor Author

cbarlin commented Feb 14, 2026

The thing blocking this PR is (mostly) the lack of testing, and that requires the plugin be versioned alongside the rest of the project. But I'll take that as approval to do that in order to get the tests going 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding endpoint from other libs to openapi documentation

2 participants