swagger-api / swagger-api/swagger-parser

io.swagger.parser.util.SwaggerDeserializer#SCHEMA_KEYS shoud contain value "externalDocs"

Open
#1,776 3 comments 1 reaction 1 assignee View on GitHub

@gracekarina is already working on this.

Since Sep 19, 2022.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

io.swagger.parser.util.SwaggerDeserializer#SCHEMA_KEYS shoud contain value "externalDocs", because swagger 2 specification allows the use of "externalDocs" in schema objects https://swagger.io/specification/v2/#schemaObject

This error is generated:

> There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
   | Error count: 1, Warning count: 0
  Errors: 
      -attribute definitions.Error.externalDocs is unexpected

for this valid swagger 2 excerption

definitions:
  Error:
    title: Error
    type: object
    description: Default error message template
    required:
      - id
      - code
      - timestamp
      - severity
    externalDocs:
      url: https://example.net/example
      description: Confluence page describing Error model

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.