mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Update schemaUtils31X.js
refactoring
This commit is contained in:
@@ -96,15 +96,9 @@ module.exports = {
|
||||
|
||||
if (hasExamplesInRoot && typeIsAnArray) {
|
||||
let foundType = this.findTypeByExample(schema.examples[0], schema.type);
|
||||
if (foundType) {
|
||||
schema.type = foundType;
|
||||
schema.type = foundType ? foundType : schema.type[0];
|
||||
schema.example = schema.examples[0];
|
||||
}
|
||||
else {
|
||||
schema.type = schema.type[0];
|
||||
schema.example = schema.examples[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (hasExamplesInRoot && !typeIsAnArray) {
|
||||
schema.example = schema.examples[0];
|
||||
|
||||
Reference in New Issue
Block a user