Open dzmitry-lahoda opened 22 hours ago
Will donate 100 USD equivalent in crypto for this feature.
Current generator seems tries to gen more valid swagger, but I do not see now next fields in master in json
// @title Process Compose API
// @version 1.0
// @description process compose description
Seems gin swagger max is // @Produce json
, so pretty useless open API.
Found only one OPI 3.0 for Go as of now, but it different http framwork, https://github.com/a-h/rest .
@F1bonacc1 what do you think about these things?
There are several approaches to generate Swagger from GRPC if that route is possible. I have seen some in Google Agones gameservers and Cosmos SDK blochchain repos (written in Go)
Hi @dzmitry-lahoda,
Can you provide a bit more information? What would be an acceptable result of this?
swagger.json
or swagger.yaml
in OpenAPI 3 format here? Orhttp://localhost:8080/
? OrIf it's only 1, can you please confirm if this is what you are looking for:
If this is acceptable I will find an automated way to keep it up to date for each release.
Feature Request
Migrate openapi (swagger) generator to openapi 3.0
Use Case:
I am Rust develop. All rust developers develop crypto.
And have not time to develop process-compose like thing (all attempts stalled).
Also Go people are very experienced in process orchestration things
So it is reasonable to just use Process Compose from Rust via Open API.
But Rust crates which render idiomatic rust like progenitor and okapi work only with Open API 3+, not 2.
Proposed Change:
Use Go mod to generate 3.0 OpenAPI
Who Benefits From The Change(s)?
Alternative Approaches
GRPC API (will fix better structured return schemas, not they are just objects)
yaml first approach (will fix better structured return schemas, not they are just objects)
convert v2 to v3 via https://github.com/getkin/kin-openapi (I am on it now, checking if it slick). UPDATE: it is not cmdcli, need to type Go code. tried https://converter.swagger.io/#/Converter/convertByContent and it converted to invalid output as (un)expected. UPDATE2: seems useless as can only produce untyped JSON in return