tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
164 stars 24 forks source link

Create Swagger API definition for API Server's HTTP service #43

Closed nascentcore-eng closed 1 year ago

nascentcore-eng commented 1 year ago

Is your feature request related to a problem? Please describe. We don't have a scheme-description as code, like protobuf for HTTP service. That could become a problem for working with frontend developers.

Describe the solution you'd like Create a swagger definition @jmzwcn @JaredTan95 @owl-ltt might have more ideas.

Describe alternatives you've considered grpc web grpc-http gateway

Additional context None

oojimmy commented 1 year ago

We can use https://github.com/swaggo/swag package to help starship generate openapi swagger-style doc.

JaredTan95 commented 1 year ago

https://github.com/swaggo/swag

Agree to use swag , Starship urgently needs to solve the API documentation, not other technical defective, although grpc-gateway is also embedded in the program, but we need to transform our current http api into grpc way, which is not suitable for the current stage to do those changes.

With swag, we can just need to import swag package, and add some annotation code https://github.com/swaggo/swag#how-to-use-it-with-gin