forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 4.0.x
This commit is contained in:
commit
dfa7e616c0
20
.travis.yml
20
.travis.yml
@ -51,9 +51,9 @@ addons:
|
||||
|
||||
before_install:
|
||||
# install haskell
|
||||
- curl -sSL https://get.haskellstack.org/ | sh
|
||||
- stack upgrade
|
||||
- stack --version
|
||||
#- curl -sSL https://get.haskellstack.org/ | sh
|
||||
#- stack upgrade
|
||||
#- stack --version
|
||||
# install rust
|
||||
- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
|
||||
# required when sudo: required for the Ruby petstore tests
|
||||
@ -75,11 +75,11 @@ before_install:
|
||||
- sudo apt-get install -qq curl
|
||||
# install dart
|
||||
#- sudo apt-get update
|
||||
- sudo apt-get install apt-transport-https
|
||||
- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
|
||||
- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install dart
|
||||
#- sudo apt-get install apt-transport-https
|
||||
#- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
|
||||
#- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
|
||||
#- sudo apt-get update
|
||||
#- sudo apt-get install dart
|
||||
# switch to php7
|
||||
- phpenv global 7.1
|
||||
- php -v
|
||||
@ -112,8 +112,8 @@ install:
|
||||
- gcc -v
|
||||
- echo $CC
|
||||
- echo $CXX
|
||||
- pub version
|
||||
- dart --version
|
||||
#- pub version
|
||||
#- dart --version
|
||||
|
||||
script:
|
||||
# fail fast
|
||||
|
23
README.md
23
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.3.3`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.3.4`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
|
||||
@ -84,8 +84,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
OpenAPI Generator Version | Release Date | Notes
|
||||
---------------------------- | ------------ | -----
|
||||
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| 20.12.2018 | Major release with breaking changes (with or without fallback)
|
||||
3.3.4 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.3.4-SNAPSHOT/) | 01.12.2018 | Bugfix release
|
||||
[3.3.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.3) (latest stable release) | 15.11.2018 | Bugfix release
|
||||
[3.3.4](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.3.4) (latest stable release) | 30.11.2018 | Bugfix release
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@ -141,16 +140,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
|
||||
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.3/openapi-generator-cli-3.3.3.jar`
|
||||
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.3/openapi-generator-cli-3.3.3.jar -O openapi-generator-cli.jar
|
||||
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.3/openapi-generator-cli-3.3.3.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@ -210,7 +209,7 @@ To build from source, you need the following installed and available in your `$P
|
||||
|
||||
* [Java 8](http://java.oracle.com)
|
||||
|
||||
* [Apache maven 3.3.3 or greater](http://maven.apache.org/)
|
||||
* [Apache maven 3.3.4 or greater](http://maven.apache.org/)
|
||||
|
||||
After cloning the project, you can build it from source with this command:
|
||||
```sh
|
||||
@ -279,13 +278,13 @@ GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $CID)
|
||||
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \
|
||||
'http://localhost:8888/api/gen/clients/ruby'
|
||||
|
||||
{"code":"c2d483d3-3672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483d3-3672-40e9-91df-b9ffd18d22b8"}
|
||||
{"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"}
|
||||
|
||||
# Download the generated zip file
|
||||
> wget http://localhost:8888/api/gen/download/c2d483d3-3672-40e9-91df-b9ffd18d22b8
|
||||
> wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8
|
||||
|
||||
# Unzip the file
|
||||
> unzip c2d483d3-3672-40e9-91df-b9ffd18d22b8
|
||||
> unzip c2d483.3.4672-40e9-91df-b9ffd18d22b8
|
||||
|
||||
# Shutdown the openapi generator image
|
||||
> docker stop $CID && docker rm $CID
|
||||
@ -353,10 +352,10 @@ npm install @openapitools/openapi-generator-cli -g
|
||||
openapi-generator version
|
||||
```
|
||||
|
||||
Or install a particualar OpenAPI Generator version (e.g. v3.3.3):
|
||||
Or install a particualar OpenAPI Generator version (e.g. v3.3.4):
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli@cli-3.3.3 -g
|
||||
npm install @openapitools/openapi-generator-cli@cli-3.3.4 -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
|
@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/confluenceWikiDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
|
||||
ags="generate -t modules/openapi-generator/src/main/resources/htmlDocs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -48,7 +48,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.3"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec
|
||||
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
|
||||
|
||||
```bash
|
||||
gradle -PopenApiGeneratorVersion=3.3.3 openApiValidate
|
||||
gradle -PopenApiGeneratorVersion=3.3.4 openApiValidate
|
||||
```
|
||||
|
@ -1 +1 @@
|
||||
openApiGeneratorVersion=3.3.3
|
||||
openApiGeneratorVersion=3.3.4
|
||||
|
@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<version>3.3.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<version>3.3.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<version>3.3.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>3.3.3</version>
|
||||
<version>3.3.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -19,11 +19,11 @@ package org.openapitools.codegen.online.service;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.online.api.GenApiDelegate;
|
||||
import org.openapitools.codegen.CliOption;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenConfigLoader;
|
||||
import org.openapitools.codegen.CodegenType;
|
||||
import org.openapitools.codegen.online.api.GenApiDelegate;
|
||||
import org.openapitools.codegen.online.model.Generated;
|
||||
import org.openapitools.codegen.online.model.GeneratorInput;
|
||||
import org.openapitools.codegen.online.model.ResponseCode;
|
||||
@ -36,8 +36,9 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
||||
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@ -114,33 +115,7 @@ public class GenApiService implements GenApiDelegate {
|
||||
@Override
|
||||
public ResponseEntity<ResponseCode> generateClient(String language, GeneratorInput generatorInput) {
|
||||
String filename = Generator.generateClient(language, generatorInput);
|
||||
String host = System.getenv("GENERATOR_HOST");
|
||||
HttpServletRequest servletRequest = request.getNativeRequest(HttpServletRequest.class);
|
||||
|
||||
if (StringUtils.isBlank(host)) {
|
||||
String scheme = servletRequest.getHeader("X-SSL");
|
||||
String port = "";
|
||||
if ("1".equals(scheme)) {
|
||||
scheme = "https";
|
||||
} else {
|
||||
scheme = servletRequest.getScheme();
|
||||
port = ":" + servletRequest.getServerPort();
|
||||
}
|
||||
host = scheme + "://" + servletRequest.getServerName() + port;
|
||||
}
|
||||
|
||||
if (filename != null) {
|
||||
String code = String.valueOf(UUID.randomUUID().toString());
|
||||
Generated g = new Generated();
|
||||
g.setFilename(filename);
|
||||
g.setFriendlyName(language + "-client");
|
||||
fileMap.put(code, g);
|
||||
System.out.println(code + ", " + filename);
|
||||
String link = host + "/api/gen/download/" + code;
|
||||
return ResponseEntity.ok().body(new ResponseCode(code, link));
|
||||
} else {
|
||||
return ResponseEntity.status(500).build();
|
||||
}
|
||||
return getResponse(filename, language + "-client");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -183,20 +158,27 @@ public class GenApiService implements GenApiDelegate {
|
||||
String filename = Generator.generateServer(framework, generatorInput);
|
||||
System.out.println("generated name: " + filename);
|
||||
|
||||
HttpServletRequest servletRequest = request.getNativeRequest(HttpServletRequest.class);
|
||||
return getResponse(filename, framework + "-server");
|
||||
}
|
||||
|
||||
String host =
|
||||
servletRequest.getScheme() + "://" + servletRequest.getServerName() + ":"
|
||||
+ servletRequest.getServerPort();
|
||||
private ResponseEntity<ResponseCode> getResponse(String filename, String friendlyName) {
|
||||
String host = System.getenv("GENERATOR_HOST");
|
||||
|
||||
UriComponentsBuilder uriBuilder;
|
||||
if (!StringUtils.isBlank(host)) {
|
||||
uriBuilder = UriComponentsBuilder.fromUriString(host);
|
||||
} else {
|
||||
uriBuilder = ServletUriComponentsBuilder.fromCurrentContextPath();
|
||||
}
|
||||
|
||||
if (filename != null) {
|
||||
String code = String.valueOf(UUID.randomUUID().toString());
|
||||
String code = UUID.randomUUID().toString();
|
||||
Generated g = new Generated();
|
||||
g.setFilename(filename);
|
||||
g.setFriendlyName(framework + "-server");
|
||||
g.setFriendlyName(friendlyName);
|
||||
fileMap.put(code, g);
|
||||
System.out.println(code + ", " + filename);
|
||||
String link = host + "/api/gen/download/" + code;
|
||||
String link = uriBuilder.path("/api/gen/download/").path(code).toUriString();
|
||||
return ResponseEntity.ok().body(new ResponseCode(code, link));
|
||||
} else {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
|
||||
|
@ -20,7 +20,7 @@
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "~2.3.4",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,8 @@
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
"sinon": "1.17.3",
|
||||
"expect.js": "~0.3.1"
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ h2. Endpoints
|
||||
{{#hasHeaderParams}}
|
||||
h5. Header Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
{{#headerParam}}{{>param}}
|
||||
{{/headerParam}}
|
||||
{{#headerParams}}{{>param}}
|
||||
{{/headerParams}}
|
||||
{{/hasHeaderParams}}
|
||||
|
||||
{{#hasQueryParams}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
{{#isHeaderParam}}<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Header Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>{{/isHeaderParam}}
|
||||
<div class="param-desc"><span class="param-type">Header Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>
|
||||
|
@ -83,7 +83,7 @@
|
||||
{{#hasHeaderParams}}
|
||||
<h3 class="field-label">Request headers</h3>
|
||||
<div class="field-items">
|
||||
{{#headerParam}}{{>headerParam}}{{/headerParam}}
|
||||
{{#headerParams}}{{>headerParam}}{{/headerParams}}
|
||||
</div> <!-- field-items -->
|
||||
{{/hasHeaderParams}}
|
||||
|
||||
|
4
pom.xml
4
pom.xml
@ -1020,8 +1020,8 @@
|
||||
<modules>
|
||||
<!-- clients -->
|
||||
<!--<module>samples/client/petstore/c</module>-->
|
||||
<module>samples/client/petstore/dart-jaguar/openapi</module>
|
||||
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
|
||||
<!--<module>samples/client/petstore/dart-jaguar/openapi</module>
|
||||
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>-->
|
||||
<!--<module>samples/client/petstore/dart2/petstore</module>-->
|
||||
<!--<module>samples/client/petstore/haskell-http-client</module>-->
|
||||
<module>samples/client/petstore/elm-0.18</module>
|
||||
|
@ -131,7 +131,6 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Animal](docs/Animal.md)
|
||||
- [OpenApiPetstore.AnimalFarm](docs/AnimalFarm.md)
|
||||
- [OpenApiPetstore.ApiResponse](docs/ApiResponse.md)
|
||||
- [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
@ -162,7 +161,6 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "~2.3.4",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
import ApiClient from './ApiClient';
|
||||
import AdditionalPropertiesClass from './model/AdditionalPropertiesClass';
|
||||
import Animal from './model/Animal';
|
||||
import AnimalFarm from './model/AnimalFarm';
|
||||
import ApiResponse from './model/ApiResponse';
|
||||
import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly';
|
||||
import ArrayOfNumberOnly from './model/ArrayOfNumberOnly';
|
||||
@ -46,7 +45,6 @@ import OuterEnum from './model/OuterEnum';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import SpecialModelName from './model/SpecialModelName';
|
||||
import StringBooleanMap from './model/StringBooleanMap';
|
||||
import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
@ -107,12 +105,6 @@ export {
|
||||
*/
|
||||
Animal,
|
||||
|
||||
/**
|
||||
* The AnimalFarm model constructor.
|
||||
* @property {module:model/AnimalFarm}
|
||||
*/
|
||||
AnimalFarm,
|
||||
|
||||
/**
|
||||
* The ApiResponse model constructor.
|
||||
* @property {module:model/ApiResponse}
|
||||
@ -293,12 +285,6 @@ export {
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.AnimalFarm();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('AnimalFarm', function() {
|
||||
it('should create an instance of AnimalFarm', function() {
|
||||
// uncomment below and update the code to test AnimalFarm
|
||||
//var instane = new SwaggerPetstore.AnimalFarm();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.AnimalFarm);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.AnimalFarm();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('AnimalFarm', function() {
|
||||
it('should create an instance of AnimalFarm', function() {
|
||||
// uncomment below and update the code to test AnimalFarm
|
||||
//var instane = new OpenApiPetstore.AnimalFarm();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.AnimalFarm);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instane = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -129,7 +129,6 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Animal](docs/Animal.md)
|
||||
- [OpenApiPetstore.AnimalFarm](docs/AnimalFarm.md)
|
||||
- [OpenApiPetstore.ApiResponse](docs/ApiResponse.md)
|
||||
- [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
@ -160,7 +159,6 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "~2.3.4",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
import ApiClient from './ApiClient';
|
||||
import AdditionalPropertiesClass from './model/AdditionalPropertiesClass';
|
||||
import Animal from './model/Animal';
|
||||
import AnimalFarm from './model/AnimalFarm';
|
||||
import ApiResponse from './model/ApiResponse';
|
||||
import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly';
|
||||
import ArrayOfNumberOnly from './model/ArrayOfNumberOnly';
|
||||
@ -46,7 +45,6 @@ import OuterEnum from './model/OuterEnum';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import SpecialModelName from './model/SpecialModelName';
|
||||
import StringBooleanMap from './model/StringBooleanMap';
|
||||
import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
@ -107,12 +105,6 @@ export {
|
||||
*/
|
||||
Animal,
|
||||
|
||||
/**
|
||||
* The AnimalFarm model constructor.
|
||||
* @property {module:model/AnimalFarm}
|
||||
*/
|
||||
AnimalFarm,
|
||||
|
||||
/**
|
||||
* The ApiResponse model constructor.
|
||||
* @property {module:model/ApiResponse}
|
||||
@ -293,12 +285,6 @@ export {
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.AnimalFarm();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('AnimalFarm', function() {
|
||||
it('should create an instance of AnimalFarm', function() {
|
||||
// uncomment below and update the code to test AnimalFarm
|
||||
//var instane = new SwaggerPetstore.AnimalFarm();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.AnimalFarm);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instane = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -153,7 +153,6 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Animal](docs/Animal.md)
|
||||
- [OpenApiPetstore.AnimalFarm](docs/AnimalFarm.md)
|
||||
- [OpenApiPetstore.ApiResponse](docs/ApiResponse.md)
|
||||
- [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
@ -184,7 +183,6 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
"sinon": "1.17.3",
|
||||
"expect.js": "~0.3.1"
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@ -71,11 +71,6 @@
|
||||
* @property {module:model/Animal}
|
||||
*/
|
||||
Animal: Animal,
|
||||
/**
|
||||
* The AnimalFarm model constructor.
|
||||
* @property {module:model/AnimalFarm}
|
||||
*/
|
||||
AnimalFarm: AnimalFarm,
|
||||
/**
|
||||
* The ApiResponse model constructor.
|
||||
* @property {module:model/ApiResponse}
|
||||
@ -226,11 +221,6 @@
|
||||
* @property {module:model/SpecialModelName}
|
||||
*/
|
||||
SpecialModelName: SpecialModelName,
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap: StringBooleanMap,
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
@ -1,70 +0,0 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.SwaggerPetstore);
|
||||
}
|
||||
}(this, function(expect, SwaggerPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new SwaggerPetstore.AnimalFarm();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('AnimalFarm', function() {
|
||||
it('should create an instance of AnimalFarm', function() {
|
||||
// uncomment below and update the code to test AnimalFarm
|
||||
//var instane = new SwaggerPetstore.AnimalFarm();
|
||||
//expect(instance).to.be.a(SwaggerPetstore.AnimalFarm);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instance = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -156,7 +156,6 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [OpenApiPetstore.Animal](docs/Animal.md)
|
||||
- [OpenApiPetstore.AnimalFarm](docs/AnimalFarm.md)
|
||||
- [OpenApiPetstore.ApiResponse](docs/ApiResponse.md)
|
||||
- [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
@ -187,7 +186,6 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
"sinon": "1.17.3",
|
||||
"expect.js": "~0.3.1"
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "^5.2.0",
|
||||
"sinon": "1.17.3"
|
||||
}
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@ -71,11 +71,6 @@
|
||||
* @property {module:model/Animal}
|
||||
*/
|
||||
Animal: Animal,
|
||||
/**
|
||||
* The AnimalFarm model constructor.
|
||||
* @property {module:model/AnimalFarm}
|
||||
*/
|
||||
AnimalFarm: AnimalFarm,
|
||||
/**
|
||||
* The ApiResponse model constructor.
|
||||
* @property {module:model/ApiResponse}
|
||||
@ -226,11 +221,6 @@
|
||||
* @property {module:model/SpecialModelName}
|
||||
*/
|
||||
SpecialModelName: SpecialModelName,
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap: StringBooleanMap,
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
@ -1,46 +0,0 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenAPIPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenAPIPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenAPIPetstore.AnimalFarm();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('AnimalFarm', function() {
|
||||
it('should create an instance of AnimalFarm', function() {
|
||||
// uncomment below and update the code to test AnimalFarm
|
||||
//var instane = new OpenAPIPetstore.AnimalFarm();
|
||||
//expect(instance).to.be.a(OpenAPIPetstore.AnimalFarm);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instance = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
@ -1 +1 @@
|
||||
3.2.1-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -59,12 +59,14 @@ h2. Endpoints
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|petId |Pet id to delete |(/) | | |
|
||||
|petId |Pet id to delete |(/) |null | |
|
||||
|
||||
|
||||
|
||||
h5. Header Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|apiKey | |(x) |null | |
|
||||
|
||||
|
||||
|
||||
|
||||
@ -103,7 +105,7 @@ h2. Endpoints
|
||||
|
||||
h5. Query Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|status |Status values that need to be considered for filter |(/) | | |
|
||||
|status |Status values that need to be considered for filter |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -174,7 +176,7 @@ array[Pet]
|
||||
|
||||
h5. Query Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|tags |Tags to filter by |(/) | | |
|
||||
|tags |Tags to filter by |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -242,7 +244,7 @@ array[Pet]
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|petId |ID of pet to return |(/) | | |
|
||||
|petId |ID of pet to return |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -391,7 +393,7 @@ Pet
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|petId |ID of pet that needs to be updated |(/) | | |
|
||||
|petId |ID of pet that needs to be updated |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -430,7 +432,7 @@ Pet
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|petId |ID of pet to update |(/) | | |
|
||||
|petId |ID of pet to update |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -475,7 +477,7 @@ ApiResponse
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|orderId |ID of the order that needs to be deleted |(/) | | |
|
||||
|orderId |ID of the order that needs to be deleted |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -574,7 +576,7 @@ map[String, Integer]
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|orderId |ID of pet that needs to be fetched |(/) | | |
|
||||
|orderId |ID of pet that needs to be fetched |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -836,7 +838,7 @@ Order
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|username |The name that needs to be deleted |(/) | | |
|
||||
|username |The name that needs to be deleted |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -890,7 +892,7 @@ Order
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|username |The name that needs to be fetched. Use user1 for testing. |(/) | | |
|
||||
|username |The name that needs to be fetched. Use user1 for testing. |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -973,9 +975,9 @@ User
|
||||
|
||||
h5. Query Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|username |The user name for login |(/) | | |
|
||||
|username |The user name for login |(/) |null | |
|
||||
|
||||
|password |The password for login in clear text |(/) | | |
|
||||
|password |The password for login in clear text |(/) |null | |
|
||||
|
||||
|
||||
|
||||
@ -1088,7 +1090,7 @@ String
|
||||
h4. Parameters
|
||||
h5. Path Parameters
|
||||
||Name||Description||Required||Default||Pattern||
|
||||
|username |name that need to be deleted |(/) | | |
|
||||
|username |name that need to be deleted |(/) |null | |
|
||||
|
||||
|
||||
h5. Body Parameter
|
||||
|
@ -1 +1 @@
|
||||
3.3.2-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -284,6 +284,9 @@ font-style: italic;
|
||||
|
||||
<h3 class="field-label">Request headers</h3>
|
||||
<div class="field-items">
|
||||
<div class="param">api_key (optional)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Header Parameter</span> — default: null </div>
|
||||
|
||||
</div> <!-- field-items -->
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user