oxidecomputer/dropshot

Expose ApiSchemaGenerator and ApiEndpointHeader

adamchalmers opened this issue · 0 comments

There's a pub struct ApiEndpointResponse however it cannot be instantiated by users of this library. Why? Because it has fields of type Option<ApiSchemaGenerator> and Vec<ApiEndpointHeader> and those types aren't exposed by Dropshot. In fact their docs are hidden.

For context, the only reason I want to instantiate ApiEndpointResponse is that I'm trying to implement HttpResponse and the response_metadata method has to return it. Is HttpResponse supposed to be a "sealed"? If your intention is that consumers can't implement HttpResponse and have to rely on the existing Dropshot types which implement it, then OK, no need to expose these things.