You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some trait WithSchema alike WithContentType in our internal serde module. This trait probably has a single method generate_schema with an associated type that must respect serde::Serialize.
Some default implementation of WithSchema for all the primitive types. This can be hardcoded, no need to use a schema gen for that.
For Json we rather add some generator based on schemars (1.0, because schemas must be conform to 2020-12 spec minimum). But I would put this implementation behind a feature flag, so people can opt out of using schemars, and in that case Json implements the WithSchema simply returning an accept all schema (which is the empty object in the json schema spec).
This WithSchema trait then should be used in the macro generated Discoverable implementation. Wiring should probably happen in ServiceGenerator, in impl_discoverable method. The spec of the Discoverable output is also described in the endpoint_manifest_schema.json
Discovery right now doesn't propagate much for input/output in the macro, we could propagate more.
The text was updated successfully, but these errors were encountered: