oxidecomputer / oxidecomputer/dropshot

Expose ApiSchemaGenerator and ApiEndpointHeader

Open
#643 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.2k
Forks
104
Avg merge
1d 19h
Merged PRs (30d)
22

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the public definitions and documentation visibility of ApiSchemaGenerator, ApiEndpointHeader, ApiEndpointResponse, and HttpResponse. Clarify whether consumers are intended to implement HttpResponse; done means either exposing the required types for that implementation or documenting the intended limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.