Skip to content

Add /openapi ingress route to serve a merged OpenAPI spec#4538

Open
igalshilman wants to merge 1 commit intorestatedev:mainfrom
igalshilman:add_services_openapi
Open

Add /openapi ingress route to serve a merged OpenAPI spec#4538
igalshilman wants to merge 1 commit intorestatedev:mainfrom
igalshilman:add_services_openapi

Conversation

@igalshilman
Copy link
Copy Markdown
Contributor

@igalshilman igalshilman commented Mar 27, 2026

Support /openapi on the ingress to serve a merged OpenAPI spec

Implements #3108.

The ingress /openapi endpoint (previously stubbed as NotImplemented)
now returns a merged OpenAPI 3.1 spec combining all registered services.

Schema component names, $ref pointers, and JSON Schema titles (when
present) are all aligned between per-service and merged specs using
PascalCase naming with a service-level prefix.

Examples:
service "greeter", handler "greet"
-> GreeterGreetRequest / GreeterGreetResponse

service "concurrent_greeter", handler "claude_sonnet" -> ConcurrentGreeterClaudeSonnetRequest 

The prefix can be overridden via the "dev.restate.openapi.prefix"
metadata key, which can be set at both the service and handler level.
Handler-level takes precedence over service-level.

Examples with metadata:
service metadata: dev.restate.openapi.prefix = "Payments"
-> PaymentsProcessRequest (instead of PaymentServiceProcessRequest)

handler metadata: dev.restate.openapi.prefix = "Checkout" -> CheckoutProcessRequest (overrides service prefix for that handler) 

When set at the service level, the prefix is also used as the
per-service OpenAPI spec title.

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@igalshilman igalshilman force-pushed the add_services_openapi branch 2 times, most recently from 573541d to 7f3b687 Compare March 27, 2026 16:40
@igalshilman igalshilman force-pushed the add_services_openapi branch from 7f3b687 to bd5eb59 Compare March 27, 2026 17:31
Implements restatedev#3108. The ingress /openapi endpoint (previously stubbed as NotImplemented) now returns a merged OpenAPI 3.1 spec combining all registered services. Schema component names, $ref pointers, and JSON Schema titles (when present) are all aligned between per-service and merged specs using PascalCase naming with a service-level prefix. Examples: service "greeter", handler "greet" -> GreeterGreetRequest / GreeterGreetResponse service "concurrent_greeter", handler "claude_sonnet" -> ConcurrentGreeterClaudeSonnetRequest The prefix can be overridden via the "dev.restate.openapi.prefix" metadata key, which can be set at both the service and handler level. Handler-level takes precedence over service-level. Examples with metadata: service metadata: dev.restate.openapi.prefix = "Payments" -> PaymentsProcessRequest (instead of PaymentServiceProcessRequest) handler metadata: dev.restate.openapi.prefix = "Checkout" -> CheckoutProcessRequest (overrides service prefix for that handler) When set at the service level, the prefix is also used as the per-service OpenAPI spec title.
@igalshilman igalshilman force-pushed the add_services_openapi branch from bd5eb59 to 797269b Compare March 27, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant