swagger-api / swagger-api/swagger-ui

Display errors/warnings on dynamic API generation

Open
#6,469 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: question type: support
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A
  • OS: Linux
  • Browser: chrome
  • Version: 85
  • Method of installation: cdnjs
  • Swagger-UI version: 3.17
  • Swagger/OpenAPI version: Swagger 2.0
Content & configuration
Screenshots
How can we help?

I have a server side application that generates my spec, that spec is then displayed by swagger-ui. When my server encounters an issue, it can produce a warning but at the moment it is not included in the generated spec (so there is no way to know about this warning from swagger-ui).

Is it possible to show my server-side warning in swagger-ui? For example by triggering the error-wrapper divs as in swagger-editor?

image

Thanks in advance!

Contributor guide

Open the contributing guide

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 Swagger UI's dynamic specification loading and comparing the error-wrapper behavior referenced from Swagger Editor. Determine how server-side warnings could be represented in the generated spec and surfaced in the UI. Done means warnings from the server-generated specification are visibly displayed in Swagger UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.