-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document missing OpenAPI/Swagger-Defintion/API-Spec #86
Comments
I had a quick chat with @phiesel about this topic.
What does this mean for us + this project right now? I suggest we document the current status in the README + that we keep an eye on future Gerrit versions to add support for Protobuf. |
A quick/dirty idea: Gerrits documentation is written in asciidoc: https://gerrit.googlesource.com/gerrit/+/refs/heads/master/Documentation/ Similar to go-github (https://github.com/google/go-github/blob/master/github/gen-accessors.go), we can create a
It won't be a good generate script, but more a "there is something missing" script. github.com/bytesparadise/libasciidoc could be a library to parse the asciidoc on this. Maybe the whole thing is a bit over-engineered. Just posting this piece of code here for the future me to not start 100% from scratch: package main
import (
"fmt"
"os"
"github.com/bytesparadise/libasciidoc/pkg/configuration"
"github.com/bytesparadise/libasciidoc/pkg/parser"
"github.com/bytesparadise/libasciidoc/pkg/types"
)
func main() {
filePath := "/Users/agrunwald/Development/gerrit/Documentation/rest-api-groups.txt"
file, err := os.Open(filePath)
if err != nil {
panic(err)
}
defer file.Close()
config := configuration.Configuration{}
doc, err := parser.ParseDocument(file, config)
if err != nil {
panic(err)
}
for _, v := range doc.Elements {
t := v.(types.Section)
for _, sect := range t.Title {
fmt.Print("%+v", sect)
}
}
} |
One thought would be if we can generate this client.
An API Spec file would be required for it.
A few discussions have been ongoing, but no progress/merge yet regarding this topic.
See:
The goal of this task:
Document this in the README, that this client lib is manually created + that new API endpoints must be added manually.
The text was updated successfully, but these errors were encountered: