danielgtaylor / danielgtaylor/apisprout

Add response headers to mock

Open
#46 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
719
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Currently, responses don't include the headers defined in the schema.

For example:
```yaml
paths:
/hello:
get:
summary: Hello world
responses:
'200':
description: OK
headers:
x-foo:
schema:
type: string
example: bar
content:
application/json:
schema:
type: object
properties:
foo:
type: string
```

Should return `x-foo: bar` as a response header.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Trace how the mock builds responses from the OpenAPI schema, starting with the response headers shown in the example, and verify that the x-foo header is returned with value bar for the documented /hello response.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.