Delete unnecesary test

Delete unnecesary test
This commit is contained in:
Luis Tejeda
2022-06-13 16:40:05 -05:00
parent 2b7de3b4dc
commit 361c5d8298
4 changed files with 0 additions and 164 deletions

View File

@@ -1,78 +0,0 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
"url": "http://swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"paths": {
"/pets": {
"get": {
"description": "Returns all pets alesuada ac...",
"operationId": "findPets",
"responses": {
"200": {
"description": "pet response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Pet": {
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Error": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -1,11 +0,0 @@
version: 1.0.0
title: Swagger Petstore
description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
termsOfService: http://swagger.io/terms/
contact:
name: Swagger API Team
email: apiteam@swagger.io
url: http://swagger.io
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html

View File

@@ -1,42 +0,0 @@
swagger: '2.0'
info:
"$ref": "./info/info.yaml"
paths:
/pets:
get:
description: Returns all pets alesuada ac...
operationId: findPets
responses:
'200':
description: pet response
schema:
type: array
items:
$ref: '#/definitions/Pet'
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Pet:
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string

View File

@@ -24,7 +24,6 @@ let expect = require('chai').expect,
refPaths = path.join(__dirname, BUNDLES_FOLDER + '/referenced_paths'),
SWAGGER_MULTIFILE_FOLDER = '../data/toBundleExamples/swagger20',
refPathsRefToLocalSchema = path.join(__dirname, BUNDLES_FOLDER + '/referenced_paths_local_schema'),
refInfo20 = path.join(__dirname, SWAGGER_MULTIFILE_FOLDER + '/referenced_info'),
refTags20 = path.join(__dirname, SWAGGER_MULTIFILE_FOLDER + '/referenced_tags'),
basicExample = path.join(__dirname, SWAGGER_MULTIFILE_FOLDER + '/basicExample'),
refPaths20 = path.join(__dirname, SWAGGER_MULTIFILE_FOLDER + '/referenced_paths'),
@@ -2289,38 +2288,6 @@ describe('bundle files method - 2.0', function() {
expect(JSON.stringify(res.output.data[0].bundledContent, null, 2)).to.be.equal(expected);
});
it('Should return bundled file with referenced info from root', async function () {
let contentRootFile = fs.readFileSync(refInfo20 + '/root.yaml', 'utf8'),
info = fs.readFileSync(refInfo20 + '/info/info.yaml', 'utf8'),
expected = fs.readFileSync(refInfo20 + '/expected.json', 'utf8'),
input = {
type: 'multiFile',
specificationVersion: '2.0',
rootFiles: [
{
path: '/root.yaml'
}
],
data: [
{
path: '/root.yaml',
content: contentRootFile
},
{
path: '/info/info.yaml',
content: info
}
],
options: {},
bundleFormat: 'JSON'
};
const res = await Converter.bundle(input);
expect(res).to.not.be.empty;
expect(res.result).to.be.true;
expect(JSON.stringify(res.output.data[0].bundledContent, null, 2)).to.be.equal(expected);
});
it('Should return bundled file with referenced tags from root', async function () {
let contentRootFile = fs.readFileSync(refTags20 + '/root.yaml', 'utf8'),
tags = fs.readFileSync(refTags20 + '/tags/tags.yaml', 'utf8'),