OpenApi spec generation

I have a question about using Akka Serverless within a broader system.

For instance, if I want to use an Akka Serverless backend and secure it with an API Gateway in Google Cloud i’ll need an OpenAPI spec document.

So, here I have a choice, i can:

  1. Take the Protobuf service definitions and generate and OpenApi spec doc from them (currently not an easy task to automate on review of the available tools - especially as there are spec extensions (x-google-*) required in the case outlined above and, likely, in others).
  2. Generate the Protobuf service definitions for Akka Serverless from an OpenAPI doc - which has a similar ‘wrinkle’ to (1) in that i need to ensure i generate the correct Akka Serverless annotations (for AS code gen) when generating the protobufs.

I’d like to have a single ‘source-of-truth’ in terms of my API definition, from which i can generate the other definitions required AND be able to keep them in sync (even if it’s some kind of CI mechanism that can identify when a change in A hasn’t been reflected (or conflicts with) B).

Now, i’m NOT asking for a detailed explanation of how to do the above - just outlining my concern/challenge and wondering about your thoughts on the best approach to this - where my definition of “best” is “least complex to get set up with and requires least amount of custom work”. For instance, is there a third option above that i haven’t considered.

Thanks for any thoughts/opinions you can offer here.

Something we have “in the pipe” is automatic generation of an OpenApi spec from the deployed service descriptors.

that’s great, thanks… any idea of when that might be available?

Sorry, can’t give any estimate on that right now.

I thought that would be the case but took a shot anyway ;)

Thanks Johan, take care