@datafire/swagger_generator
v6.0.0
Published
DataFire integration for Swagger Generator
Downloads
17
Readme
@datafire/swagger_generator
Client library for Swagger Generator
Installation and Usage
npm install --save @datafire/swagger_generator
let swagger_generator = require('@datafire/swagger_generator').create();
.then(data => {
console.log(data);
});
Description
This is an online swagger codegen server. You can find out more at https://github.com/swagger-api/swagger-codegen or on irc.freenode.net, #swagger.
Actions
clientOptions
Gets languages supported by the client generator
swagger_generator.clientOptions(null, context)
Input
This action has no parameters
Output
- output
array
- items
string
- items
getClientOptions
Returns options for a client library
swagger_generator.getClientOptions({
"language": ""
}, context)
Input
- input
object
- language required
string
(values: ada, akka-scala, android, apex, bash, clojure, cpprest, csharp, csharp-dotnet2, cwiki, dart, dart-jaguar, dynamic-html, eiffel, elixir, elm, erlang-client, flash, go, groovy, haskell-http-client, html, html2, java, javascript, javascript-closure-angular, jaxrs-cxf-client, jmeter, kotlin, lua, objc, perl, php, powershell, python, qt5cpp, r, ruby, rust, scala, scala-gatling, scalaz, swagger, swagger-yaml, swift, swift3, swift4, swift5, tizen, typescript-angular, typescript-angularjs, typescript-aurelia, typescript-fetch, typescript-inversify, typescript-jquery, typescript-node, ue4cpp): The target language for the client library
- language required
Output
- output
object
generateClient
Accepts a GeneratorInput
options map for spec location and generation options
swagger_generator.generateClient({
"language": "",
"body": {}
}, context)
Input
- input
object
- language required
string
(values: ada, akka-scala, android, apex, bash, clojure, cpprest, csharp, csharp-dotnet2, cwiki, dart, dart-jaguar, dynamic-html, eiffel, elixir, elm, erlang-client, flash, go, groovy, haskell-http-client, html, html2, java, javascript, javascript-closure-angular, jaxrs-cxf-client, jmeter, kotlin, lua, objc, perl, php, powershell, python, qt5cpp, r, ruby, rust, scala, scala-gatling, scalaz, swagger, swagger-yaml, swift, swift3, swift4, swift5, tizen, typescript-angular, typescript-angularjs, typescript-aurelia, typescript-fetch, typescript-inversify, typescript-jquery, typescript-node, ue4cpp): The target language for the client library - body required GeneratorInput
- language required
Output
- output ResponseCode
downloadFile
A valid fileId
is generated by the /clients/{language}
or /servers/{language}
POST operations. The fileId code can be used just once, after which a new fileId
will need to be requested.
swagger_generator.downloadFile({
"fileId": ""
}, context)
Input
- input
object
- fileId required
string
- fileId required
Output
- output
string
serverOptions
Gets languages supported by the server generator
swagger_generator.serverOptions(null, context)
Input
This action has no parameters
Output
- output
array
- items
string
- items
getServerOptions
Returns options for a server framework
swagger_generator.getServerOptions({
"framework": ""
}, context)
Input
- input
object
- framework required
string
(values: ada-server, aspnetcore, erlang-server, finch, go-server, haskell, inflector, java-pkmst, java-play-framework, java-vertx, jaxrs, jaxrs-cxf, jaxrs-cxf-cdi, jaxrs-resteasy, jaxrs-resteasy-eap, jaxrs-spec, kotlin-server, lumen, msf4j, nancyfx, nodejs-server, php-silex, php-symfony, pistache-server, python-flask, rails5, restbed, rust-server, scala-lagom-server, scalatra, sinatra, slim, spring, undertow, ze-ph): The target language for the server framework
- framework required
Output
- output
object
generateServerForLanguage
Accepts a GeneratorInput
options map for spec location and generation options.
swagger_generator.generateServerForLanguage({
"framework": "",
"body": {}
}, context)
Input
- input
object
- framework required
string
(values: ada-server, aspnetcore, erlang-server, finch, go-server, haskell, inflector, java-pkmst, java-play-framework, java-vertx, jaxrs, jaxrs-cxf, jaxrs-cxf-cdi, jaxrs-resteasy, jaxrs-resteasy-eap, jaxrs-spec, kotlin-server, lumen, msf4j, nancyfx, nodejs-server, php-silex, php-symfony, pistache-server, python-flask, rails5, restbed, rust-server, scala-lagom-server, scalatra, sinatra, slim, spring, undertow, ze-ph): framework - body required GeneratorInput
- framework required
Output
- output ResponseCode
Definitions
AuthorizationValue
- AuthorizationValue
object
- keyName
string
- type
string
- value
string
- keyName
CliOption
- CliOption
object
- default
string
- description
string
- enum
object
- optionName
string
- type
string
: Data type is based on the types supported by the JSON-Schema
- default
GeneratorInput
- GeneratorInput
object
- authorizationValue AuthorizationValue
- options
object
- securityDefinition SecuritySchemeDefinition
- spec
object
- swaggerUrl
string
ResponseCode
- ResponseCode
object
- code
string
: File download code - link
string
: URL for fetching the generated client
- code
SecuritySchemeDefinition
- SecuritySchemeDefinition
object
- description
string
- type
string
- description