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

"examples" property not rendering in HTML. Depricated "example" properly rendering. #4616

Open
yuggieg opened this issue Nov 23, 2023 · 0 comments

Comments

@yuggieg
Copy link

yuggieg commented Nov 23, 2023

Q&A (please complete the following information)

  • Browser: FireFox
  • Method of installation: SwaggerEditor online
  • Swagger/OpenAPI version: OpenAPI 3.1.0

Content & configuration

Example Swagger/OpenAPI definition:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Thing getter",
    "version": "1.0"
  },
  "paths": {
    "/things/": {
      "get": {
        "operationId": "get_thing",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Thing"
                  },
                  "type": "array",
                  "title": "Response get things things"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Thing": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the sensor"
          },
          "prop1": {
            "type": "number",
            "title": "prop1",
            "example": 1
          },
          "prop2": {
            "type": "number",
            "title": "prop2",
            "examples": [2]
          }
        },
        "type": "object",
        "title": "Thing"
      }
    }
  }
}

Describe the bug you're encountering

In the Schemas section, the examples of prop2 is not rendered, the deprecated example is, however.

Expected behavior

I would expect to have the examples also rendered in the Schemas section.

Screenshots

image
@yuggieg yuggieg changed the title "examples" property not rendering in HTML. Depracted "example" properly rendering. "examples" property not rendering in HTML. Depricated "example" properly rendering. Nov 23, 2023
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

1 participant