question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Example.externalValue` is not displayed

See original GitHub issue

Example Swagger/OpenAPI definition

openapi: 3.0.0

paths:
  /:
    post:
      requestBody:
        content:
          image/png:
            schema:
              type: string
              format: binary
            examples:
              KittenImage:
                externalValue: "https://placekitten.com/200/300"
      responses:
        "200":
          description: OK!

Current behavior

image

Expected behavior

I should be able to use the externally-referenced image as an example value for my endpoint (provided that Swagger UI is able to reach the resource).

Additional context or thoughts

#5427.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:14
  • Comments:26 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
simundevcommented, Mar 21, 2020

I have the same problem. I prefer to keep my examples in external .json files (same with models) so as not to clutter the spec itself too much. Any idea where this is in the priority stack please?

7reactions
lyzkovcommented, Jun 14, 2020

The documentation says that there is possible to use externalValue. Please update the documentation or fix a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger UI does not show the externalValue URL contents ...
I am developing a Quarkus REST-based application where I would like to display the API on SwaggerUI. Alon with that I would like...
Read more >
Swagger UI does not show the externalValue URL con...
Swagger UI does not show the externalValue URL contents while using @ExampleObject under @Content. I am developing a Quarkus REST-based ...
Read more >
no-example-value-and-externalValue - Redocly
According to the OpenAPI specification, the value field and externalValue field are mutually exclusive. An object that contains both violates the specification.
Read more >
Adding Examples - Swagger
Note: Do not confuse example values with default values. ... it is neither YAML-, nor JSON-conformant, you can use the externalValue keyword to...
Read more >
OpenAPI Specification
This does not include the host or base path of the API. For example, in /items/{itemId} , the path parameter is itemId ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found