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.

Configurable depth of properties in "Response Schema"

See original GitHub issue

In the “Response Schema” section of an API call, the whole response (including nested entities) is shown, e.g. like this:

Response Schema
Status Code 200
Name          | Type        | Required | Description
--            | --          | --       | --
anonymous     | [Animals]   | false    | No description
» comment     | string      | false    | Optional note
» kittens     | [Kitten]    | false    | A list of kittens
--            | --          | --       | --
»» name       | string      | false    | e.g. "Mr Meowz"

The UI correctly shows clickable links to the entitites (Animals and Kitten). If interested, a user can jump to the schema description if additional details are required. In the response schema section the nested properties may be unnecessary though. The link to the schema should be enough, as the information is duplicated here.

It would be great if the depth in the response schema was configurable, i.e. show every property (as this is done right now) or only expand nested entities to depth one (only show property “comment” and “kittens”) or depth two (show “comment”, “kittens” and “name”), etc.

Can this already be achieved? There are other depth related options, but none of them seem to have an effect on this. If its not already possible, can this be extended?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
geld0rcommented, May 11, 2018

Sounds great, I’ll try this out!

0reactions
MikeRalphsoncommented, Aug 9, 2018

@rssteffey thanks for testing! It seems my nervousness about those commits was justified. Reverted. Really going to have to write some tests for the schemaToArray function… 😢

Read more comments on GitHub >

github_iconTop Results From Across the Web

Limit the depth of properties documented by Swashbuckle for ...
How can I create a operation/schema/document filter that limits the depth of recursion to just the top level, and just uses the type...
Read more >
Getting Started Step-By-Step - JSON Schema
We start with four properties called keywords which are expressed as JSON keys. Yes. the standard uses a JSON data document to describe...
Read more >
Limit the depth of generated examples in a Swagger ...
Is it possible to limit the depth of generated examples, or at least disable examples for a particular endpoint?
Read more >
Springdoc-openapi Properties
Parameter name Default Value Description springdoc.swagger‑ui.oauth2RedirectUrl /swagger‑ui/oauth2‑redirect.html String . OAuth re... springdoc.swagger‑ui.oauth.clientId String . Default cl... springdoc.swagger‑ui.csrf.enabled false Boolean . To en...
Read more >
Using OpenAPI and Swagger UI - Quarkus
Optionally Mandrel or GraalVM installed and configured appropriately if you want ... application/json: schema: $ref: '#/components/schemas/Fruit' responses: ...
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