unfoldedcircle / core-api

API specifications for Remote Two by Unfolded Circle
Creative Commons Attribution Share Alike 4.0 International
70 stars 1 forks source link

Move common models in AsyncAPI definitions into shared external files #11

Open zehnm opened 2 years ago

zehnm commented 2 years ago

The core and integration APIs share common models which should not be copy pasted all over the place.

Even though the AsyncAPI specification supports external references, the tooling support to handle external references is quite disappointing. Especially if one is used to the great swagger-cli bundle support with OpenAPI definitions. This puts everything back into one file for all the other tools not able to handle external references.

The AsyncAPI Bundler has serious issues bundling external references. Last time I've checked all reused references were duplicated, instead of being referenced in the final YAML file!

Most likely this issue needs to be fixed first: https://github.com/asyncapi/bundler/issues/34 Otherwise, we have to hack together something, since copying and pasting the shared definitions between the different APIs makes no sense...