Skip to content

Commit

Permalink
fix: do not URI-encode parameter values for better readability
Browse files Browse the repository at this point in the history
fixes #1138
  • Loading branch information
RomanHotsiy committed Dec 12, 2019
1 parent e01eea4 commit 6aeb0bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Fields/FieldDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export class FieldDetails extends React.PureComponent<FieldProps> {
if (showExamples && example !== undefined) {
const label = l('example') + ':';
if (field.in && (field.style || field.serializationMime)) {
const serializedValue = serializeParameterValue(field, example);
// decode for better readability in examples: see https://github.com/Redocly/redoc/issues/1138
const serializedValue = decodeURIComponent(serializeParameterValue(field, example));
exampleField = <FieldDetail label={label} value={serializedValue} raw={true} />;
} else {
exampleField = <FieldDetail label={label} value={example} />;
Expand Down

0 comments on commit 6aeb0bf

Please sign in to comment.