mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-21 12:10:32 +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 ['json'];
|
||||
return [CODE_SAMPLE_LANGUAGES.JSON];
|
||||
}
|
||||
|
||||
theme: ResolvedThemeInterface;
|
||||
|
|
|
@ -76,26 +76,27 @@ describe('Models', () => {
|
|||
test('should deref the properties of a schema', () => {
|
||||
const spec = require('./fixtures/properties.json');
|
||||
parser = new OpenAPIParser(spec, undefined, opts);
|
||||
const string = 'string';
|
||||
const example = {
|
||||
id: 0,
|
||||
category: {
|
||||
id: 0,
|
||||
name: 'string',
|
||||
name: string,
|
||||
sub: {
|
||||
prop1: 'string',
|
||||
prop1: string,
|
||||
},
|
||||
},
|
||||
name: 'Guru',
|
||||
photoUrls: ['string'],
|
||||
photoUrls: [string],
|
||||
friend: {},
|
||||
tags: [
|
||||
{
|
||||
id: 0,
|
||||
name: 'string',
|
||||
name: string,
|
||||
},
|
||||
],
|
||||
status: 'available',
|
||||
petType: 'string',
|
||||
petType: string,
|
||||
};
|
||||
|
||||
expect(
|
||||
|
|
|
@ -84,7 +84,7 @@ export class MediaTypeModel {
|
|||
|
||||
const xmlExamples = this.resolveXmlExample(parser, sample as OpenAPIExample);
|
||||
if (xmlExamples[0]) {
|
||||
this.examples[subSchema.title].value = xmlExamples[0]?.exampleValue;
|
||||
this.examples[subSchema.title].value = xmlExamples[0].exampleValue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user