Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ApiSchemaGenerator and ApiEndpointHeader #643

Open
adamchalmers opened this issue Apr 13, 2023 · 0 comments
Open

Expose ApiSchemaGenerator and ApiEndpointHeader #643

adamchalmers opened this issue Apr 13, 2023 · 0 comments

Comments

@adamchalmers
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant