Skip to content

Bug Report: Malformed OpenAPI Server URLs in Learning Material #46

Description

@manueldezman

Resource link

Sample servers object
Options with the server URL

Description

There is a syntax error in the OpenAPI servers configuration block within the learning resources. The URLs are currently wrapped in Markdown link syntax[text](url), which causes validation failures when copied into Swagger Editor.

Per the OpenAPI specification, the url field must strictly contain a literal URL string.

Steps to Reproduce

  1. Copy the current code snippet from the tutorial resource.
  2. Paste it into the Swagger Editor.
  3. Observe the validation errors thrown on the url lines under the servers: block.

Visual Evidence (Errors)

Image Image

Proposed Fix

The brackets and parentheses must be stripped out so the url fields contain clean, valid string paths.

Current Broken Snippet:

servers:
- url: [https://openweathermap.org](https://openweathermap.org)
  description: Production server
- url: [http://openweathermap.org](http://openweathermap.org)
  description: Beta server
- url: [http://openweathermap.org](http://openweathermap.org)
  description: Some other server

Corrected Snippet:

servers:
  - url: https://openweathermap.org
    description: Production server
  - url: http://openweathermap.org
    description: Beta server
  - url: http://openweathermap.org
    description: Some other server

Expected Outcome

Image

With this change, the specification will pass strict OpenAPI validation, and learners will be able to render and test the endpoints in the Swagger interactive UI seamlessly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions