smithy4s icon indicating copy to clipboard operation
smithy4s copied to clipboard

sbt plugin: allow configuring openapi spec generation

Open yoohaemin opened this issue 1 year ago • 2 comments

I have a problem that is solved by calling jsonAdd on openapi generation. It’s the same as this: https://github.com/smithy-lang/smithy/issues/834

It’s easy if I can control the arguments passed to the following method:

https://github.com/disneystreaming/alloy/blob/fd6b8b067b69e3033c288bb665de8054108bf747/modules/openapi/src/alloy/openapi/package.scala#L33

However, the current sbt plugin doesn’t provide a way to configure this; it simply calls the generate method that doesn’t take any configuration arguments:

https://github.com/disneystreaming/smithy4s/blob/ee9abfb9430879eeabc18dd9edab188f7b32c03d/modules/codegen/src/smithy4s/codegen/internals/CodegenImpl.scala#L67

Would it be possible that the sbt plugin expose a key to transform this configuration?

In the meantime, because it’s quite difficult to modify the build process from our sbt build, I am thinking of re-parsing and transform the outputted json...

yoohaemin avatar Apr 10 '24 05:04 yoohaemin

In a very timely fashion, @astridej and I have been discussing at how to best solve this.

Can't guarantee a timeframe but it's being looked at.

Baccata avatar Apr 10 '24 07:04 Baccata

had a similar such desire to add a server list. TY

yisraelU avatar Apr 11 '24 18:04 yisraelU