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

Summary of examples removed #685

Closed
majoshi1 opened this issue Mar 8, 2022 · 6 comments
Closed

Summary of examples removed #685

majoshi1 opened this issue Mar 8, 2022 · 6 comments

Comments

@majoshi1
Copy link

majoshi1 commented Mar 8, 2022

The summary of examples was removed in v9.1.4. It has been working fine till v9.1.3/api-request.js#L248. Is there a way to achieve it in v9.1.4? If not, is it possible to revert the change?

	"parameters": [{
			"name": "someName",
			"schema": {},
			"examples": {
				"example1": {
					"summary": "Item1",
					"value": "10"
				}
			}
		}

	]
}
@mrin9
Copy link
Collaborator

mrin9 commented Mar 8, 2022

The summary of examples was removed in v9.1.4

where, you mean when listing them it now uses value instead of summary ?

@majoshi1
Copy link
Author

majoshi1 commented Mar 8, 2022

Yes. Below are the lines from both versions for comparison:

  1. Shows summary (v9.1.3)

v9.1.3/api-request.js#L248

>${v.description || v.summary || v.value}</a>


  1. Does not show summary (v9.1.4)

v9.1.4/api-request.js#L249

>${v.value && Array.isArray(v.value) ? (v.value?.join(', ')) : (v.value || '')}</a>

@majoshi1
Copy link
Author

Any update here please? Can't update to latest version, until this defect is fixed.

@mrin9
Copy link
Collaborator

mrin9 commented Mar 26, 2022

this was done as we received many user feedback stating its better to show the actual values than summary for examples
I will check if I can provide any options for both possibilities.

@majoshi1
Copy link
Author

How about vendor extension?
e.g. x-example-summary-show : no for each parameter to indicate if summary should be used. Also may be RapiDoc attribute show-examples-summary = true/false to indicate for the entire spec.

@mrin9
Copy link
Collaborator

mrin9 commented Mar 31, 2022

use use-summary-to-list-example = true to list example summary instead of value (default is false)

@mrin9 mrin9 closed this as completed Mar 31, 2022
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

2 participants