shelf icon indicating copy to clipboard operation
shelf copied to clipboard

Support for OpenAPI?

Open gerardsimons opened this issue 3 years ago • 3 comments
trafficstars

Is there any support for OpenAPI (preferably v3) or any known extensions / middleware for it? I know Conduit has it, but I do like that this package is supported by the Dart team. Any suggestions welcome, thanks!

gerardsimons avatar Aug 15 '22 13:08 gerardsimons

Oh actually it turns out that Conduit only supports generation of OpenAPI documents from code not the other way around ...

gerardsimons avatar Aug 15 '22 13:08 gerardsimons

OpenApi support is too broad, do you mean generate shelf server code based on an OpenApi definition? If yes the right repo would be https://github.com/OpenAPITools/openapi-generator but for now such a generator doesn't exist. I guess it shouldn't be too hard as we can use shelf annotation and let build_runner do the heavy work for us. And for the models there is already some dart generator available so we can reuse what they've done.

jaumard avatar Aug 15 '22 16:08 jaumard

Yes, that's what I meant! It would be a great addition I think.

gerardsimons avatar Aug 17 '22 10:08 gerardsimons

Love the idea in general, but it's a bit to broad (and complex) for this repo! Excited to see what the community does here!

kevmoo avatar Sep 22 '22 03:09 kevmoo