delta icon indicating copy to clipboard operation
delta copied to clipboard

Swagger Documentation

Open alvin-reyes opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. We need to be build a better experience for developers by providing documentations that can be used to programmatically integrate delta.

Describe the solution you'd like We can use swagger and start documenting the REST API handlers.

We have done this on Estuary and we can apply the same process for Delta.

### Tasks
- [ ] Generate swagger docs for deal api
- [ ] Generate swagger docs for open stats api
- [ ] Generate swagger docs for open stats info api
- [ ] Generate swagger docs for repair and retry api

alvin-reyes avatar Jun 12 '23 20:06 alvin-reyes

Scaffolding/Initial commit: https://github.com/application-research/delta/tree/swagger-docs

To run the swagger generator

make generate-swagger

The above command will do the following:

  • scan the ./api directory for all the *.go files starting with router.go
  • scan all the annotations on the handlers
  • generate the swagger documentation in ./docs/swagger/swagger.yaml

Check swagger docs using /swagger endpoint.

alvin-reyes avatar Jun 13 '23 17:06 alvin-reyes

First attempt at annotations for the deal.go API file Swagger docs #143

Will need review, I have some active TODO items that I need to clarify. Requested code review with Alvin for next week when I get back from ETH Waterloo.

dawnkelly09 avatar Jun 21 '23 19:06 dawnkelly09