mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-22 21:10:34 +03:00
FBI-451: address CR comments
This commit is contained in:
parent
f29b7aeb08
commit
69c7fc4f34
|
@ -222,7 +222,7 @@ export class RedocNormalizedOptions {
|
||||||
return value.map(lang => lang.toLowerCase()) as CodeSamplesLanguage[];
|
return value.map(lang => lang.toLowerCase()) as CodeSamplesLanguage[];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['json'];
|
return [CODE_SAMPLE_LANGUAGES.JSON];
|
||||||
}
|
}
|
||||||
|
|
||||||
theme: ResolvedThemeInterface;
|
theme: ResolvedThemeInterface;
|
||||||
|
|
|
@ -76,26 +76,27 @@ describe('Models', () => {
|
||||||
test('should deref the properties of a schema', () => {
|
test('should deref the properties of a schema', () => {
|
||||||
const spec = require('./fixtures/properties.json');
|
const spec = require('./fixtures/properties.json');
|
||||||
parser = new OpenAPIParser(spec, undefined, opts);
|
parser = new OpenAPIParser(spec, undefined, opts);
|
||||||
|
const string = 'string';
|
||||||
const example = {
|
const example = {
|
||||||
id: 0,
|
id: 0,
|
||||||
category: {
|
category: {
|
||||||
id: 0,
|
id: 0,
|
||||||
name: 'string',
|
name: string,
|
||||||
sub: {
|
sub: {
|
||||||
prop1: 'string',
|
prop1: string,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name: 'Guru',
|
name: 'Guru',
|
||||||
photoUrls: ['string'],
|
photoUrls: [string],
|
||||||
friend: {},
|
friend: {},
|
||||||
tags: [
|
tags: [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
name: 'string',
|
name: string,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
status: 'available',
|
status: 'available',
|
||||||
petType: 'string',
|
petType: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
|
|
|
@ -84,7 +84,7 @@ export class MediaTypeModel {
|
||||||
|
|
||||||
const xmlExamples = this.resolveXmlExample(parser, sample as OpenAPIExample);
|
const xmlExamples = this.resolveXmlExample(parser, sample as OpenAPIExample);
|
||||||
if (xmlExamples[0]) {
|
if (xmlExamples[0]) {
|
||||||
this.examples[subSchema.title].value = xmlExamples[0]?.exampleValue;
|
this.examples[subSchema.title].value = xmlExamples[0].exampleValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user