protoc-gen-openapi

command
v3.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

protoc-gen-openapi

Generate an OpenAPI 3 spec for the Micro API from your Micro service proto.

Todo

  • Read proto files
  • Output OpenAPI3 JSON spec
    • Info.Title comes from the proto package name
  • Build a map of "Schemas" (one for each "message")
    • Field descriptions from code
    • Possible to use references? Not for v1
  • Add a "Path" for each proto "service" method
    • Summary is proto filename and service.method
    • Description is comments from code
    • app/json RequestBody payload from message "input" schema
    • app/json Response payload from message "output" schema
      • Default error payloads
  • Add a "Server" for each Micro platform API endpoint (dev / prod etc)
  • Auth with API token (according to docs)
  • Parameters
    • Namespace (as a header)
    • Namespace (as a hostname component, but this invites errors)
    • Service name (as first part of the URL path)

References aren't working (request/responses should reference a schema)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL