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

headers description comes from the schema not the header property #10

Closed
krichards opened this issue Mar 29, 2023 · 1 comment
Closed

Comments

@krichards
Copy link

krichards commented Mar 29, 2023

Given a header schema such as this

const HeadersSchema = {
  type: 'object',
  properties: {
    'x-app-id': {type: 'string',   description: 'application identifier'}
  },
  required: ['x-app-id']
} as const;

I would expect the description to come through on the header on docs, but it doesn't. Currently it would appear that I need to do this

const HeadersSchema = {
  type: 'object',
  properties: {
    'x-app-id': {type: 'string'}
  },
  required: ['x-app-id'],
  description: 'application identifier'
} as const;

which is obviously wrong if I want to have checks on different headers.

ShogunPanda added a commit that referenced this issue Mar 29, 2023
@ShogunPanda
Copy link
Owner

ShogunPanda commented Mar 29, 2023

You are right. Thanks for reporting this. I fixed this in release 2.2.1

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

2 participants