restate icon indicating copy to clipboard operation
restate copied to clipboard

Getting OpenAPI spec of a service?

Open musjj opened this issue 1 year ago • 4 comments

I'm noticing that there's an openapi endpoint:

https://github.com/restatedev/restate/blob/494c7f8f02abb1a8359de303e00d850a04b00ca0/crates/admin/src/rest_api/mod.rs#L63-L66

But running (with the Tour of Restate example):

$ curl localhost:9070/services/CartObject/openapi

Prints nothing.

musjj avatar Feb 08 '25 20:02 musjj

Hey I'm adding this to the documentation: https://github.com/restatedev/documentation/pull/521 It will be available in Restate 1.2, releasing this week

slinkydeveloper avatar Feb 10 '25 07:02 slinkydeveloper

Thank you, can't wait to try it!

the rich input/output JSON schemas are included as well

Can you elaborate what this means? Does this mean that the spec of the input/output schema might not be included?

musjj avatar Feb 10 '25 09:02 musjj

Does this mean that the spec of the input/output schema might not be included?

Yes, that's because we still need to add json schema support in the various SDKs. At the moment only Java and Python have a good support for it, for the other SDKs what you get is just schema: true, which client generators interpret as "any" input/generic json or something alike.

slinkydeveloper avatar Feb 10 '25 09:02 slinkydeveloper

Gonna close this as solved. Re-open if you need it.

FYI we're gonna release a new version of each SDK soon, and all of them from now on will have the ability to either generate or provide json schemas for the request input/output

slinkydeveloper avatar Mar 24 '25 08:03 slinkydeveloper