influxdata / influxdata/influxdb
Automate adherence to our API spec
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
While investigating #20645, I found that OSS's support for setting a `password` key in create-user requests goes against our API spec, and isn't implemented in Cloud. This is at least the 2nd time since GA that our implementation has differed from the spec, which we consider the source of truth (the other clear example was the mismatched key names in the DBRP API). I assume there are other differences lurking that we just haven't hit yet.
Swagger / OpenAPI is meant to support codegen of servers based on an API spec. We should explore the options for this in Go. If we find a tool that generates decent code, we could use it to replace our existing HTTP route & model definitions and eliminate mismatches between spec and implementation.
Contributor guide
Research direction
Start by reviewing the API-spec mismatch from #20645 and the mismatched DBRP key names described here, then inspect the existing HTTP route and model definitions. Research Go tools that generate server code from Swagger/OpenAPI and compare their output with the current implementation. Done means identifying a viable code-generation approach that can replace the existing definitions and prevent spec mismatches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100