graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

OpenAPI 3.1. spec generation

Open thll opened this issue 4 months ago • 0 comments

Generates an OpenAPI 3.1 description for the Graylog REST API.

  • Updates the API browser to use Swagger UI as a React component.
  • Removes the node-local API browser due to implementation challenges (CORS issues) and limited value.
  • Migrates backend code from io.swagger.annotations.* to io.swagger.v3.oas.annotations.* annotations.
  • Adds a generate-openapi maven profile to create a openapi.yaml description for our default configuration as part of the build.
  • Includes several customizations for the swagger generator, e.g., inclusion of schemas for registered Jackson subtypes.

TODO:

  • [ ] Generate concise schema components for types like org.joda.time.Duration, org.joda.time.Period, com.google.common.collect.ImmutableSet and others which appear to be unnecessarily complex or outright wrong
  • [ ] Remove term Graylog from API description
  • [ ] Don't add openapi.yaml to VCS.

/prd https://github.com/Graylog2/graylog-project-internal/pull/198, https://github.com/Graylog2/graylog-plugin-enterprise/pull/12256

thll avatar Oct 10 '25 12:10 thll