fastify / fastify/help

Is it possible to have multiple response schemas for the same status code

Open
#807 7 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
No language data
Stars
68
Forks
8
Avg merge
11h 2m
Merged PRs (30d)
2

Description

Hey guys. I'm trying to figure out if there is a way to have multiple potential schemas for the same HTTP status code in the response schema.

For instance, some of my endpoints are returning different e.g. `400` errors based on what failed and I'd like to describe them, and have them visible in my `@fastify/swagger`.

Right now, it seems that only single response schema for a given http code is possible, and I wonder, if it's possible to have multiple potential responses described.

Thanks a lot in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.