forked from loafle/openapi-generator-original
Deprecate Flash (ActionScript) client generator (#7231)
* deprecate flash client generator * update doc * add doc * remove left-over doc * add back flash-deprecated.md * remove flash.md
This commit is contained in:
parent
ed1e30e75e
commit
cf0385676b
@ -1,7 +0,0 @@
|
|||||||
generatorName: flash
|
|
||||||
outputDir: samples/client/petstore/flash
|
|
||||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
|
||||||
templateDir: modules/openapi-generator/src/main/resources/flash
|
|
||||||
additionalProperties:
|
|
||||||
invokerPackage: org.openapitools
|
|
||||||
packageName: org.openapitools
|
|
@ -27,7 +27,7 @@ The following generators are available:
|
|||||||
* [elm](generators/elm.md)
|
* [elm](generators/elm.md)
|
||||||
* [erlang-client](generators/erlang-client.md)
|
* [erlang-client](generators/erlang-client.md)
|
||||||
* [erlang-proper](generators/erlang-proper.md)
|
* [erlang-proper](generators/erlang-proper.md)
|
||||||
* [flash](generators/flash.md)
|
* [flash-deprecated (deprecated)](generators/flash-deprecated.md)
|
||||||
* [go](generators/go.md)
|
* [go](generators/go.md)
|
||||||
* [go-experimental (experimental)](generators/go-experimental.md)
|
* [go-experimental (experimental)](generators/go-experimental.md)
|
||||||
* [groovy](generators/groovy.md)
|
* [groovy](generators/groovy.md)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Config Options for flash
|
title: Config Options for flash-deprecated
|
||||||
sidebar_label: flash
|
sidebar_label: flash-deprecated
|
||||||
---
|
---
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
| Option | Description | Values | Default |
|
@ -1,199 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for nodejs-server-deprecated
|
|
||||||
sidebar_label: nodejs-server-deprecated
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null|
|
|
||||||
|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false|
|
|
||||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|serverPort|TCP port to listen on.| |null|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|Array|java.util.List|
|
|
||||||
|ArrayList|java.util.ArrayList|
|
|
||||||
|BigDecimal|java.math.BigDecimal|
|
|
||||||
|Date|java.util.Date|
|
|
||||||
|DateTime|org.joda.time.*|
|
|
||||||
|File|java.io.File|
|
|
||||||
|HashMap|java.util.HashMap|
|
|
||||||
|LinkedHashSet|java.util.LinkedHashSet|
|
|
||||||
|List|java.util.*|
|
|
||||||
|LocalDate|org.joda.time.*|
|
|
||||||
|LocalDateTime|org.joda.time.*|
|
|
||||||
|LocalTime|org.joda.time.*|
|
|
||||||
|Map|java.util.Map|
|
|
||||||
|Set|java.util.*|
|
|
||||||
|Timestamp|java.sql.Timestamp|
|
|
||||||
|URI|java.net.URI|
|
|
||||||
|UUID|java.util.UUID|
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>break</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>const</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>debugger</li>
|
|
||||||
<li>default</li>
|
|
||||||
<li>delete</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>enum</li>
|
|
||||||
<li>export</li>
|
|
||||||
<li>extends</li>
|
|
||||||
<li>finally</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>function</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>instanceof</li>
|
|
||||||
<li>let</li>
|
|
||||||
<li>new</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>this</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>typeof</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>void</li>
|
|
||||||
<li>while</li>
|
|
||||||
<li>with</li>
|
|
||||||
<li>yield</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✓|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✗|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✗|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -1,248 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for powershell-experimental
|
|
||||||
sidebar_label: powershell-experimental
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|apiNamePrefix|Prefix that will be appended to all PS objects. Default: empty string. e.g. Pet => PSPet.| |null|
|
|
||||||
|commonVerbs|PS common verb mappings. e.g. Delete=Remove:Patch=Update to map Delete with Remove and Patch with Update accordingly.| |null|
|
|
||||||
|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null|
|
|
||||||
|packageName|Client package name (e.g. PSTwitter).| |PSOpenAPITools|
|
|
||||||
|packageVersion|Package version (e.g. 0.1.2).| |0.1.2|
|
|
||||||
|powershellGalleryUrl|URL to the module in PowerShell Gallery (e.g. https://www.powershellgallery.com/packages/PSTwitter/).| |null|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|Array|java.util.List|
|
|
||||||
|ArrayList|java.util.ArrayList|
|
|
||||||
|BigDecimal|java.math.BigDecimal|
|
|
||||||
|Date|java.util.Date|
|
|
||||||
|DateTime|org.joda.time.*|
|
|
||||||
|File|java.io.File|
|
|
||||||
|HashMap|java.util.HashMap|
|
|
||||||
|LinkedHashSet|java.util.LinkedHashSet|
|
|
||||||
|List|java.util.*|
|
|
||||||
|LocalDate|org.joda.time.*|
|
|
||||||
|LocalDateTime|org.joda.time.*|
|
|
||||||
|LocalTime|org.joda.time.*|
|
|
||||||
|Map|java.util.Map|
|
|
||||||
|Set|java.util.*|
|
|
||||||
|Timestamp|java.sql.Timestamp|
|
|
||||||
|URI|java.net.URI|
|
|
||||||
|UUID|java.util.UUID|
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Boolean</li>
|
|
||||||
<li>Byte</li>
|
|
||||||
<li>Byte[]</li>
|
|
||||||
<li>Char</li>
|
|
||||||
<li>Decimal</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Guid</li>
|
|
||||||
<li>Int16</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>ProgressRecord</li>
|
|
||||||
<li>SByte</li>
|
|
||||||
<li>SecureString</li>
|
|
||||||
<li>Single</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>System.DateTime</li>
|
|
||||||
<li>System.IO.FileInfo</li>
|
|
||||||
<li>TimeSpan</li>
|
|
||||||
<li>UInt16</li>
|
|
||||||
<li>UInt32</li>
|
|
||||||
<li>UInt64</li>
|
|
||||||
<li>Uri</li>
|
|
||||||
<li>Version</li>
|
|
||||||
<li>XmlDocument</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>args</li>
|
|
||||||
<li>begin</li>
|
|
||||||
<li>break</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>consolefilename</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>data</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>dynamicparam</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>elseif</li>
|
|
||||||
<li>end</li>
|
|
||||||
<li>error</li>
|
|
||||||
<li>event</li>
|
|
||||||
<li>eventargs</li>
|
|
||||||
<li>eventsubscriber</li>
|
|
||||||
<li>executioncontext</li>
|
|
||||||
<li>exit</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>filter</li>
|
|
||||||
<li>finally</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>foreach</li>
|
|
||||||
<li>from</li>
|
|
||||||
<li>function</li>
|
|
||||||
<li>home</li>
|
|
||||||
<li>host</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>input</li>
|
|
||||||
<li>lastexitcode</li>
|
|
||||||
<li>local</li>
|
|
||||||
<li>matches</li>
|
|
||||||
<li>myinvocation</li>
|
|
||||||
<li>nestedpromptlevel</li>
|
|
||||||
<li>null</li>
|
|
||||||
<li>param</li>
|
|
||||||
<li>pid</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>process</li>
|
|
||||||
<li>profile</li>
|
|
||||||
<li>pscmdlet</li>
|
|
||||||
<li>pscommandpath</li>
|
|
||||||
<li>psculture</li>
|
|
||||||
<li>psdebugcontext</li>
|
|
||||||
<li>pshome</li>
|
|
||||||
<li>psitem</li>
|
|
||||||
<li>psscriptroot</li>
|
|
||||||
<li>pssenderinfo</li>
|
|
||||||
<li>psuiculture</li>
|
|
||||||
<li>psversiontable</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>sender</li>
|
|
||||||
<li>shellid</li>
|
|
||||||
<li>stacktrace</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>this</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>trap</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>until</li>
|
|
||||||
<li>where</li>
|
|
||||||
<li>while</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✓|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✗|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✓|OAS2,OAS3
|
|
||||||
|ApiKey|✓|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✓|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✓|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -1,221 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for scala-akka-http
|
|
||||||
sidebar_label: scala-akka-http
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|akkaHttpVersion|The version of akka-http| |10.1.10|
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|apiPackage|package for generated api classes| |null|
|
|
||||||
|artifactId|artifactId| |openapi-scala-akka-http-server|
|
|
||||||
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|
|
||||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|java8|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
|
||||||
|invokerPackage|root package for generated code| |org.openapitools.server|
|
|
||||||
|modelPackage|package for generated models| |null|
|
|
||||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|sourceFolder|source folder for generated code| |null|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|Array|java.util.List|
|
|
||||||
|ArrayList|java.util.ArrayList|
|
|
||||||
|Date|java.util.Date|
|
|
||||||
|DateTime|org.joda.time.*|
|
|
||||||
|File|java.io.File|
|
|
||||||
|HashMap|java.util.HashMap|
|
|
||||||
|ListBuffer|scala.collection.mutable.ListBuffer|
|
|
||||||
|ListSet|scala.collection.immutable.ListSet|
|
|
||||||
|LocalDate|org.joda.time.*|
|
|
||||||
|LocalDateTime|org.joda.time.*|
|
|
||||||
|LocalTime|org.joda.time.*|
|
|
||||||
|Timestamp|java.sql.Timestamp|
|
|
||||||
|URI|java.net.URI|
|
|
||||||
|UUID|java.util.UUID|
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|array|ListBuffer|
|
|
||||||
|map|Map|
|
|
||||||
|set|Set|
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Any</li>
|
|
||||||
<li>Array</li>
|
|
||||||
<li>Boolean</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>List</li>
|
|
||||||
<li>Long</li>
|
|
||||||
<li>Map</li>
|
|
||||||
<li>Object</li>
|
|
||||||
<li>Seq</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>boolean</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>abstract</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>def</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>extends</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>final</li>
|
|
||||||
<li>finally</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>forsome</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>implicit</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>lazy</li>
|
|
||||||
<li>match</li>
|
|
||||||
<li>new</li>
|
|
||||||
<li>null</li>
|
|
||||||
<li>object</li>
|
|
||||||
<li>override</li>
|
|
||||||
<li>package</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>protected</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>sealed</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>this</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>trait</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>type</li>
|
|
||||||
<li>val</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>while</li>
|
|
||||||
<li>with</li>
|
|
||||||
<li>yield</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✓|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✗|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✓|OAS2,OAS3
|
|
||||||
|ApiKey|✓|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✓|OAS3
|
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✓|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✓|OAS2,OAS3
|
|
@ -1,265 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for swift2-deprecated
|
|
||||||
sidebar_label: swift2-deprecated
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
|
||||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
|
||||||
|podAuthors|Authors used for Podspec| |null|
|
|
||||||
|podDescription|Description used for Podspec| |null|
|
|
||||||
|podDocsetURL|Docset URL used for Podspec| |null|
|
|
||||||
|podDocumentationURL|Documentation URL used for Podspec| |null|
|
|
||||||
|podHomepage|Homepage used for Podspec| |null|
|
|
||||||
|podLicense|License used for Podspec| |null|
|
|
||||||
|podScreenshots|Screenshots used for Podspec| |null|
|
|
||||||
|podSocialMediaURL|Social Media URL used for Podspec| |null|
|
|
||||||
|podSource|Source information used for Podspec| |null|
|
|
||||||
|podSummary|Summary used for Podspec| |null|
|
|
||||||
|podVersion|Version used for Podspec| |null|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|projectName|Project name in Xcode| |null|
|
|
||||||
|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null|
|
|
||||||
|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Void</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Any</li>
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>COLUMN</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Class</li>
|
|
||||||
<li>Data</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>ErrorResponse</li>
|
|
||||||
<li>FILE</li>
|
|
||||||
<li>FUNCTION</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>LINE</li>
|
|
||||||
<li>Protocol</li>
|
|
||||||
<li>Self</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Type</li>
|
|
||||||
<li>Void</li>
|
|
||||||
<li>as</li>
|
|
||||||
<li>associativity</li>
|
|
||||||
<li>break</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>convenience</li>
|
|
||||||
<li>default</li>
|
|
||||||
<li>defer</li>
|
|
||||||
<li>deinit</li>
|
|
||||||
<li>didSet</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>dynamic</li>
|
|
||||||
<li>dynamicType</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>enum</li>
|
|
||||||
<li>extension</li>
|
|
||||||
<li>fallthrough</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>fileprivate</li>
|
|
||||||
<li>final</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>func</li>
|
|
||||||
<li>get</li>
|
|
||||||
<li>guard</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>indirect</li>
|
|
||||||
<li>infix</li>
|
|
||||||
<li>init</li>
|
|
||||||
<li>inout</li>
|
|
||||||
<li>internal</li>
|
|
||||||
<li>is</li>
|
|
||||||
<li>lazy</li>
|
|
||||||
<li>left</li>
|
|
||||||
<li>let</li>
|
|
||||||
<li>mutating</li>
|
|
||||||
<li>nil</li>
|
|
||||||
<li>none</li>
|
|
||||||
<li>nonmutating</li>
|
|
||||||
<li>open</li>
|
|
||||||
<li>operator</li>
|
|
||||||
<li>optional</li>
|
|
||||||
<li>override</li>
|
|
||||||
<li>postfix</li>
|
|
||||||
<li>precedence</li>
|
|
||||||
<li>prefix</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>protocol</li>
|
|
||||||
<li>public</li>
|
|
||||||
<li>repeat</li>
|
|
||||||
<li>required</li>
|
|
||||||
<li>rethrows</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>right</li>
|
|
||||||
<li>self</li>
|
|
||||||
<li>set</li>
|
|
||||||
<li>static</li>
|
|
||||||
<li>struct</li>
|
|
||||||
<li>subscript</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>throws</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>typealias</li>
|
|
||||||
<li>unowned</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>weak</li>
|
|
||||||
<li>where</li>
|
|
||||||
<li>while</li>
|
|
||||||
<li>willSet</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✗|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✗|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✗|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -1,259 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for swift3-deprecated
|
|
||||||
sidebar_label: swift3-deprecated
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
|
||||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
|
||||||
|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
|
|
||||||
|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null|
|
|
||||||
|podAuthors|Authors used for Podspec| |null|
|
|
||||||
|podDescription|Description used for Podspec| |null|
|
|
||||||
|podDocsetURL|Docset URL used for Podspec| |null|
|
|
||||||
|podDocumentationURL|Documentation URL used for Podspec| |null|
|
|
||||||
|podHomepage|Homepage used for Podspec| |null|
|
|
||||||
|podLicense|License used for Podspec| |null|
|
|
||||||
|podScreenshots|Screenshots used for Podspec| |null|
|
|
||||||
|podSocialMediaURL|Social Media URL used for Podspec| |null|
|
|
||||||
|podSource|Source information used for Podspec| |null|
|
|
||||||
|podSummary|Summary used for Podspec| |null|
|
|
||||||
|podVersion|Version used for Podspec| |null|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|projectName|Project name in Xcode| |null|
|
|
||||||
|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null|
|
|
||||||
|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Any</li>
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Void</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Any</li>
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>COLUMN</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Class</li>
|
|
||||||
<li>Data</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Error</li>
|
|
||||||
<li>ErrorResponse</li>
|
|
||||||
<li>FILE</li>
|
|
||||||
<li>FUNCTION</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>LINE</li>
|
|
||||||
<li>Protocol</li>
|
|
||||||
<li>Response</li>
|
|
||||||
<li>Self</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Type</li>
|
|
||||||
<li>URL</li>
|
|
||||||
<li>Void</li>
|
|
||||||
<li>as</li>
|
|
||||||
<li>associativity</li>
|
|
||||||
<li>break</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>convenience</li>
|
|
||||||
<li>default</li>
|
|
||||||
<li>deinit</li>
|
|
||||||
<li>didSet</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>dynamic</li>
|
|
||||||
<li>dynamicType</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>enum</li>
|
|
||||||
<li>extension</li>
|
|
||||||
<li>fallthrough</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>final</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>func</li>
|
|
||||||
<li>get</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>infix</li>
|
|
||||||
<li>init</li>
|
|
||||||
<li>inout</li>
|
|
||||||
<li>internal</li>
|
|
||||||
<li>is</li>
|
|
||||||
<li>lazy</li>
|
|
||||||
<li>left</li>
|
|
||||||
<li>let</li>
|
|
||||||
<li>mutating</li>
|
|
||||||
<li>nil</li>
|
|
||||||
<li>none</li>
|
|
||||||
<li>nonmutating</li>
|
|
||||||
<li>operator</li>
|
|
||||||
<li>optional</li>
|
|
||||||
<li>override</li>
|
|
||||||
<li>postfix</li>
|
|
||||||
<li>precedence</li>
|
|
||||||
<li>prefix</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>protocol</li>
|
|
||||||
<li>public</li>
|
|
||||||
<li>required</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>right</li>
|
|
||||||
<li>self</li>
|
|
||||||
<li>set</li>
|
|
||||||
<li>static</li>
|
|
||||||
<li>struct</li>
|
|
||||||
<li>subscript</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>typealias</li>
|
|
||||||
<li>unowned</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>weak</li>
|
|
||||||
<li>where</li>
|
|
||||||
<li>while</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✗|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✗|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✗|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -1,317 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for swift4
|
|
||||||
sidebar_label: swift4
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
|
||||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
|
||||||
|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
|
|
||||||
|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null|
|
|
||||||
|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null|
|
|
||||||
|podAuthors|Authors used for Podspec| |null|
|
|
||||||
|podDescription|Description used for Podspec| |null|
|
|
||||||
|podDocsetURL|Docset URL used for Podspec| |null|
|
|
||||||
|podDocumentationURL|Documentation URL used for Podspec| |null|
|
|
||||||
|podHomepage|Homepage used for Podspec| |null|
|
|
||||||
|podLicense|License used for Podspec| |null|
|
|
||||||
|podScreenshots|Screenshots used for Podspec| |null|
|
|
||||||
|podSocialMediaURL|Social Media URL used for Podspec| |null|
|
|
||||||
|podSource|Source information used for Podspec| |null|
|
|
||||||
|podSummary|Summary used for Podspec| |null|
|
|
||||||
|podVersion|Version used for Podspec| |null|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|projectName|Project name in Xcode| |null|
|
|
||||||
|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result are available.| |null|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null|
|
|
||||||
|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Any</li>
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Data</li>
|
|
||||||
<li>Date</li>
|
|
||||||
<li>Decimal</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>URL</li>
|
|
||||||
<li>UUID</li>
|
|
||||||
<li>Void</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>#available</li>
|
|
||||||
<li>#colorLiteral</li>
|
|
||||||
<li>#column</li>
|
|
||||||
<li>#else</li>
|
|
||||||
<li>#elseif</li>
|
|
||||||
<li>#endif</li>
|
|
||||||
<li>#file</li>
|
|
||||||
<li>#fileLiteral</li>
|
|
||||||
<li>#function</li>
|
|
||||||
<li>#if</li>
|
|
||||||
<li>#imageLiteral</li>
|
|
||||||
<li>#line</li>
|
|
||||||
<li>#selector</li>
|
|
||||||
<li>#sourceLocation</li>
|
|
||||||
<li>Any</li>
|
|
||||||
<li>AnyObject</li>
|
|
||||||
<li>Array</li>
|
|
||||||
<li>Bool</li>
|
|
||||||
<li>COLUMN</li>
|
|
||||||
<li>Character</li>
|
|
||||||
<li>Class</li>
|
|
||||||
<li>ClosedRange</li>
|
|
||||||
<li>Codable</li>
|
|
||||||
<li>CountableClosedRange</li>
|
|
||||||
<li>CountableRange</li>
|
|
||||||
<li>Data</li>
|
|
||||||
<li>Decodable</li>
|
|
||||||
<li>Dictionary</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Encodable</li>
|
|
||||||
<li>Error</li>
|
|
||||||
<li>ErrorResponse</li>
|
|
||||||
<li>FILE</li>
|
|
||||||
<li>FUNCTION</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Float32</li>
|
|
||||||
<li>Float64</li>
|
|
||||||
<li>Float80</li>
|
|
||||||
<li>Int</li>
|
|
||||||
<li>Int16</li>
|
|
||||||
<li>Int32</li>
|
|
||||||
<li>Int64</li>
|
|
||||||
<li>Int8</li>
|
|
||||||
<li>LINE</li>
|
|
||||||
<li>OptionSet</li>
|
|
||||||
<li>Optional</li>
|
|
||||||
<li>Protocol</li>
|
|
||||||
<li>Range</li>
|
|
||||||
<li>Response</li>
|
|
||||||
<li>Self</li>
|
|
||||||
<li>Set</li>
|
|
||||||
<li>StaticString</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Type</li>
|
|
||||||
<li>UInt</li>
|
|
||||||
<li>UInt16</li>
|
|
||||||
<li>UInt32</li>
|
|
||||||
<li>UInt64</li>
|
|
||||||
<li>UInt8</li>
|
|
||||||
<li>URL</li>
|
|
||||||
<li>Unicode</li>
|
|
||||||
<li>Void</li>
|
|
||||||
<li>_</li>
|
|
||||||
<li>as</li>
|
|
||||||
<li>associatedtype</li>
|
|
||||||
<li>associativity</li>
|
|
||||||
<li>break</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>convenience</li>
|
|
||||||
<li>default</li>
|
|
||||||
<li>defer</li>
|
|
||||||
<li>deinit</li>
|
|
||||||
<li>didSet</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>dynamic</li>
|
|
||||||
<li>dynamicType</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>enum</li>
|
|
||||||
<li>extension</li>
|
|
||||||
<li>fallthrough</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>fileprivate</li>
|
|
||||||
<li>final</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>func</li>
|
|
||||||
<li>get</li>
|
|
||||||
<li>guard</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>indirect</li>
|
|
||||||
<li>infix</li>
|
|
||||||
<li>init</li>
|
|
||||||
<li>inout</li>
|
|
||||||
<li>internal</li>
|
|
||||||
<li>is</li>
|
|
||||||
<li>lazy</li>
|
|
||||||
<li>left</li>
|
|
||||||
<li>let</li>
|
|
||||||
<li>mutating</li>
|
|
||||||
<li>nil</li>
|
|
||||||
<li>none</li>
|
|
||||||
<li>nonmutating</li>
|
|
||||||
<li>open</li>
|
|
||||||
<li>operator</li>
|
|
||||||
<li>optional</li>
|
|
||||||
<li>override</li>
|
|
||||||
<li>postfix</li>
|
|
||||||
<li>precedence</li>
|
|
||||||
<li>prefix</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>protocol</li>
|
|
||||||
<li>public</li>
|
|
||||||
<li>repeat</li>
|
|
||||||
<li>required</li>
|
|
||||||
<li>rethrows</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>right</li>
|
|
||||||
<li>self</li>
|
|
||||||
<li>set</li>
|
|
||||||
<li>static</li>
|
|
||||||
<li>struct</li>
|
|
||||||
<li>subscript</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>throws</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>typealias</li>
|
|
||||||
<li>unowned</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>weak</li>
|
|
||||||
<li>where</li>
|
|
||||||
<li>while</li>
|
|
||||||
<li>willSet</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✗|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✗|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✗|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✓|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✓|OAS2,OAS3
|
|
||||||
|ApiKey|✓|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✓|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✗|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -1,237 +0,0 @@
|
|||||||
---
|
|
||||||
title: Config Options for typescript-angularjs
|
|
||||||
sidebar_label: typescript-angularjs
|
|
||||||
---
|
|
||||||
|
|
||||||
| Option | Description | Values | Default |
|
|
||||||
| ------ | ----------- | ------ | ------- |
|
|
||||||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|
|
||||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
|
||||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
|
||||||
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|
|
||||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|
|
||||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
|
||||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|
|
||||||
|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
|
|
||||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
|
||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|
||||||
|supportsES6|Generate code that conforms to ES6.| |false|
|
|
||||||
|
|
||||||
## IMPORT MAPPING
|
|
||||||
|
|
||||||
| Type/Alias | Imports |
|
|
||||||
| ---------- | ------- |
|
|
||||||
|
|
||||||
|
|
||||||
## INSTANTIATION TYPES
|
|
||||||
|
|
||||||
| Type/Alias | Instantiated By |
|
|
||||||
| ---------- | --------------- |
|
|
||||||
|array|Array|
|
|
||||||
|
|
||||||
|
|
||||||
## LANGUAGE PRIMITIVES
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>Array</li>
|
|
||||||
<li>Boolean</li>
|
|
||||||
<li>Date</li>
|
|
||||||
<li>Double</li>
|
|
||||||
<li>Error</li>
|
|
||||||
<li>File</li>
|
|
||||||
<li>Float</li>
|
|
||||||
<li>Integer</li>
|
|
||||||
<li>Long</li>
|
|
||||||
<li>Map</li>
|
|
||||||
<li>Object</li>
|
|
||||||
<li>ReadonlyArray</li>
|
|
||||||
<li>String</li>
|
|
||||||
<li>Set</li>
|
|
||||||
<li>any</li>
|
|
||||||
<li>boolean</li>
|
|
||||||
<li>number</li>
|
|
||||||
<li>object</li>
|
|
||||||
<li>string</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## RESERVED WORDS
|
|
||||||
|
|
||||||
<ul class="column-ul">
|
|
||||||
<li>abstract</li>
|
|
||||||
<li>await</li>
|
|
||||||
<li>boolean</li>
|
|
||||||
<li>break</li>
|
|
||||||
<li>byte</li>
|
|
||||||
<li>case</li>
|
|
||||||
<li>catch</li>
|
|
||||||
<li>char</li>
|
|
||||||
<li>class</li>
|
|
||||||
<li>const</li>
|
|
||||||
<li>continue</li>
|
|
||||||
<li>debugger</li>
|
|
||||||
<li>default</li>
|
|
||||||
<li>delete</li>
|
|
||||||
<li>do</li>
|
|
||||||
<li>double</li>
|
|
||||||
<li>else</li>
|
|
||||||
<li>enum</li>
|
|
||||||
<li>export</li>
|
|
||||||
<li>extends</li>
|
|
||||||
<li>false</li>
|
|
||||||
<li>final</li>
|
|
||||||
<li>finally</li>
|
|
||||||
<li>float</li>
|
|
||||||
<li>for</li>
|
|
||||||
<li>formParams</li>
|
|
||||||
<li>function</li>
|
|
||||||
<li>goto</li>
|
|
||||||
<li>headerParams</li>
|
|
||||||
<li>if</li>
|
|
||||||
<li>implements</li>
|
|
||||||
<li>import</li>
|
|
||||||
<li>in</li>
|
|
||||||
<li>instanceof</li>
|
|
||||||
<li>int</li>
|
|
||||||
<li>interface</li>
|
|
||||||
<li>let</li>
|
|
||||||
<li>long</li>
|
|
||||||
<li>native</li>
|
|
||||||
<li>new</li>
|
|
||||||
<li>null</li>
|
|
||||||
<li>package</li>
|
|
||||||
<li>private</li>
|
|
||||||
<li>protected</li>
|
|
||||||
<li>public</li>
|
|
||||||
<li>queryParameters</li>
|
|
||||||
<li>requestOptions</li>
|
|
||||||
<li>return</li>
|
|
||||||
<li>short</li>
|
|
||||||
<li>static</li>
|
|
||||||
<li>super</li>
|
|
||||||
<li>switch</li>
|
|
||||||
<li>synchronized</li>
|
|
||||||
<li>this</li>
|
|
||||||
<li>throw</li>
|
|
||||||
<li>transient</li>
|
|
||||||
<li>true</li>
|
|
||||||
<li>try</li>
|
|
||||||
<li>typeof</li>
|
|
||||||
<li>useFormData</li>
|
|
||||||
<li>var</li>
|
|
||||||
<li>varLocalDeferred</li>
|
|
||||||
<li>varLocalPath</li>
|
|
||||||
<li>void</li>
|
|
||||||
<li>volatile</li>
|
|
||||||
<li>while</li>
|
|
||||||
<li>with</li>
|
|
||||||
<li>yield</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
## FEATURE SET
|
|
||||||
|
|
||||||
|
|
||||||
### Client Modification Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasePath|✓|ToolingExtension
|
|
||||||
|Authorizations|✗|ToolingExtension
|
|
||||||
|UserAgent|✗|ToolingExtension
|
|
||||||
|
|
||||||
### Data Type Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
||||||
|Int32|✓|OAS2,OAS3
|
|
||||||
|Int64|✓|OAS2,OAS3
|
|
||||||
|Float|✓|OAS2,OAS3
|
|
||||||
|Double|✓|OAS2,OAS3
|
|
||||||
|Decimal|✓|ToolingExtension
|
|
||||||
|String|✓|OAS2,OAS3
|
|
||||||
|Byte|✓|OAS2,OAS3
|
|
||||||
|Binary|✓|OAS2,OAS3
|
|
||||||
|Boolean|✓|OAS2,OAS3
|
|
||||||
|Date|✓|OAS2,OAS3
|
|
||||||
|DateTime|✓|OAS2,OAS3
|
|
||||||
|Password|✓|OAS2,OAS3
|
|
||||||
|File|✓|OAS2
|
|
||||||
|Array|✓|OAS2,OAS3
|
|
||||||
|Maps|✓|ToolingExtension
|
|
||||||
|CollectionFormat|✓|OAS2
|
|
||||||
|CollectionFormatMulti|✓|OAS2
|
|
||||||
|Enum|✓|OAS2,OAS3
|
|
||||||
|ArrayOfEnum|✓|ToolingExtension
|
|
||||||
|ArrayOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|ArrayOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfEnum|✓|ToolingExtension
|
|
||||||
|MapOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfPrimitives|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfModel|✓|ToolingExtension
|
|
||||||
|MapOfCollectionOfEnum|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Documentation Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Readme|✓|ToolingExtension
|
|
||||||
|Model|✓|ToolingExtension
|
|
||||||
|Api|✓|ToolingExtension
|
|
||||||
|
|
||||||
### Global Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Host|✓|OAS2,OAS3
|
|
||||||
|BasePath|✓|OAS2,OAS3
|
|
||||||
|Info|✓|OAS2,OAS3
|
|
||||||
|Schemes|✗|OAS2,OAS3
|
|
||||||
|PartialSchemes|✓|OAS2,OAS3
|
|
||||||
|Consumes|✓|OAS2
|
|
||||||
|Produces|✓|OAS2
|
|
||||||
|ExternalDocumentation|✓|OAS2,OAS3
|
|
||||||
|Examples|✓|OAS2,OAS3
|
|
||||||
|XMLStructureDefinitions|✗|OAS2,OAS3
|
|
||||||
|MultiServer|✗|OAS3
|
|
||||||
|ParameterizedServer|✗|OAS3
|
|
||||||
|ParameterStyling|✗|OAS3
|
|
||||||
|Callbacks|✗|OAS3
|
|
||||||
|LinkObjects|✗|OAS3
|
|
||||||
|
|
||||||
### Parameter Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Path|✓|OAS2,OAS3
|
|
||||||
|Query|✓|OAS2,OAS3
|
|
||||||
|Header|✓|OAS2,OAS3
|
|
||||||
|Body|✓|OAS2
|
|
||||||
|FormUnencoded|✓|OAS2
|
|
||||||
|FormMultipart|✓|OAS2
|
|
||||||
|Cookie|✓|OAS3
|
|
||||||
|
|
||||||
### Schema Support Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|Simple|✓|OAS2,OAS3
|
|
||||||
|Composite|✓|OAS2,OAS3
|
|
||||||
|Polymorphism|✓|OAS2,OAS3
|
|
||||||
|Union|✗|OAS3
|
|
||||||
|
|
||||||
### Security Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|
||||||
|OpenIDConnect|✗|OAS3
|
|
||||||
|BearerToken|✗|OAS3
|
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|
||||||
|
|
||||||
### Wire Format Feature
|
|
||||||
| Name | Supported | Defined By |
|
|
||||||
| ---- | --------- | ---------- |
|
|
||||||
|JSON|✓|OAS2,OAS3
|
|
||||||
|XML|✓|OAS2,OAS3
|
|
||||||
|PROTOBUF|✗|ToolingExtension
|
|
||||||
|Custom|✗|OAS2,OAS3
|
|
@ -20,6 +20,8 @@ package org.openapitools.codegen.languages;
|
|||||||
import io.swagger.v3.oas.models.media.Schema;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
|
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||||
|
import org.openapitools.codegen.meta.Stability;
|
||||||
import org.openapitools.codegen.meta.features.*;
|
import org.openapitools.codegen.meta.features.*;
|
||||||
import org.openapitools.codegen.utils.ModelUtils;
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -46,6 +48,8 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
public FlashClientCodegen() {
|
public FlashClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.DEPRECATED).build();
|
||||||
|
|
||||||
modifyFeatureSet(features -> features
|
modifyFeatureSet(features -> features
|
||||||
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
|
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
|
||||||
@ -201,12 +205,12 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "flash";
|
return "flash-deprecated";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getHelp() {
|
public String getHelp() {
|
||||||
return "Generates a Flash (ActionScript) client library (beta).";
|
return "Generates a Flash (ActionScript) client library (beta). IMPORTANT: this generator has been deprecated in v5.x";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
11
samples/client/petstore/flash/.gitignore
vendored
11
samples/client/petstore/flash/.gitignore
vendored
@ -1,11 +0,0 @@
|
|||||||
# Build and Release Folders
|
|
||||||
bin/
|
|
||||||
bin-debug/
|
|
||||||
bin-release/
|
|
||||||
|
|
||||||
# Other files and folders
|
|
||||||
.settings/
|
|
||||||
|
|
||||||
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
|
|
||||||
# should NOT be excluded as they contain compiler settings and other important
|
|
||||||
# information for Eclipse / Flash Builder.
|
|
@ -1,23 +0,0 @@
|
|||||||
# OpenAPI Generator Ignore
|
|
||||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
|
||||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
||||||
#ApiClient.cs
|
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
||||||
#foo/*/qux
|
|
||||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
||||||
#foo/**/qux
|
|
||||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
||||||
#docs/*.md
|
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
|
||||||
#!docs/README.md
|
|
@ -1 +0,0 @@
|
|||||||
3.0.0-SNAPSHOT
|
|
@ -1,65 +0,0 @@
|
|||||||
README for the Flash application.
|
|
||||||
|
|
||||||
These instructions are given using the version 4.7 of Flash Builder.
|
|
||||||
|
|
||||||
How to use the Flash client library:
|
|
||||||
|
|
||||||
The code which is given to you is to be considered as a Library. Therefore, in Flash Builder, you have to:
|
|
||||||
1. Create an ActionScript Library Project. (Warning: If you are dealing with Files as parameter, you need to include the Adobe AIR libraries)
|
|
||||||
2. Copy the src folder from the flash library to the project.
|
|
||||||
3. Copy the lib folder.
|
|
||||||
4. Copy the build.properties and build.xml. (You can update the paths in build.properties)
|
|
||||||
5. Right+Click on the project folder and go to Properties. Then go to the tab 'ActionScript Library Build Path' and add these two SWC: 'as3corelib.swc' and 'ASAXB-0.1.1.swc'. (They are located in the folder lib)
|
|
||||||
6. Create the Flash Application
|
|
||||||
|
|
||||||
How to use the Flash client library in an application:
|
|
||||||
|
|
||||||
Using the Flash client library (especially getting the response message from the server) is a bit tricky.
|
|
||||||
|
|
||||||
The response message is given through an EventDispatcher. Therefore, you have to create an EventDispatcher and listen to the endpoints that you're calling. Below, you will find a pseudo-code explaining how to do this.
|
|
||||||
|
|
||||||
After creating an application in java, you will have a mxml file. In this mxml file, you need to declare a Script (given below) after the Declarations.
|
|
||||||
|
|
||||||
<fx:Script>
|
|
||||||
<![CDATA[
|
|
||||||
|
|
||||||
// Import the different libraries you need
|
|
||||||
// ...
|
|
||||||
|
|
||||||
// Import the org.openapitools libraries
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
import org.openapitools.event.ApiClientEvent;
|
|
||||||
import org.openapitools.client.api.[[API]]; // Put your Api here.
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
private var cred:ApiUserCredentials;
|
|
||||||
private var dispatcher:EventDispatcher;
|
|
||||||
private var myAPI:[[API]]; // Change [[API]] to be the real name
|
|
||||||
|
|
||||||
// Function that print in the console the message of the response
|
|
||||||
public function onEvent(event:ApiClientEvent):void {
|
|
||||||
// trace only prints when in debug mod. Be carefule about that.
|
|
||||||
trace(event.response.payload);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Main function
|
|
||||||
public main():void {
|
|
||||||
// Define a dispatcher
|
|
||||||
dispatcher = new EventDispatcher();
|
|
||||||
// Define the EventListener. Fill the [[function]] by the name of the function you have in
|
|
||||||
// the API file.
|
|
||||||
dispatcher.addEventListener([[function]], onEvent);
|
|
||||||
|
|
||||||
// To create the API, you need the ApiUserCredentials and the dispatcher.
|
|
||||||
cred = new ApiUserCredentials([[host]], [[basePath]] , [[apiToken]]);
|
|
||||||
// You can add more parameters. Go see the function in ApiUserCredential.as in org/openapitools/common
|
|
||||||
|
|
||||||
// Create the API
|
|
||||||
myAPI = new [[API]](cred, dispatcher); // change [[API]] to be the real name
|
|
||||||
|
|
||||||
// Now, you can use the API
|
|
||||||
myAPI.[[function]]([[PARAMETERS]]);
|
|
||||||
// Change [[function]] and add your parameters. Then, you will see the response in the console.
|
|
||||||
}
|
|
||||||
]]>
|
|
||||||
</fx:Script>
|
|
@ -1,29 +0,0 @@
|
|||||||
# Window and document title for the documentation
|
|
||||||
title=Sample app AS3 SDK API Documentation
|
|
||||||
|
|
||||||
#Path to the source folder where the .as files are located
|
|
||||||
sourcepath = ./src/main/flex
|
|
||||||
|
|
||||||
# Class-folders you want to search for classes to be included in the docs, separated by spaces (for example ../com/ ../net/ )
|
|
||||||
# to include every .as and .mxml file within your project, just state ../
|
|
||||||
domainextensions = ./src/main/flex
|
|
||||||
|
|
||||||
# The Location of deployment library on your Computer (PC/Mac) for compiled SWC file
|
|
||||||
liboutputfolder = bin
|
|
||||||
liboutputfile = as3-sample-sdk.swc
|
|
||||||
libpath = lib
|
|
||||||
|
|
||||||
# The Location of the output folder for your generated documents
|
|
||||||
docsoutputfolder = asdoc
|
|
||||||
|
|
||||||
# The location of the test sources
|
|
||||||
testsourcepath = ./src/test/flex
|
|
||||||
|
|
||||||
# Home directory for flex sdk, change this to build for Mac or PC using # as comment
|
|
||||||
FLEX4_SDK_HOME = /usr/local/flex_sdk_4.1.0/
|
|
||||||
#FLEX4_SDK_HOME = /Applications/Adobe Flash Builder 4/sdks/4.1.0/
|
|
||||||
|
|
||||||
# The location of your asdoc.exe, change this to build for Mac or PC using # as comment
|
|
||||||
#asdoc.exe = C:/Program Files/Adobe/Flash Builder 4/sdks/3.5.0/bin/asdoc.exe
|
|
||||||
#asdoc.exe = /Applications/Adobe Flash Builder 4/sdks/3.5.0/bin/asdoc
|
|
||||||
|
|
@ -1,192 +0,0 @@
|
|||||||
<!-- Flex Library Project ASDocs -->
|
|
||||||
|
|
||||||
<project name="AS3SDKCompile" default="compile" basedir=".">
|
|
||||||
|
|
||||||
<!-- import our build properties file -->
|
|
||||||
<property file="./build.properties"/>
|
|
||||||
<property environment="env"/>
|
|
||||||
<property name="FLEX_HOME" value="${FLEX4_SDK_HOME}"/>
|
|
||||||
<property name="FLEX4_HOME" value="${FLEX4_SDK_HOME}"/>
|
|
||||||
|
|
||||||
<!--<property name="flexunit.swc" value="../lib/ext/flexunit-4.1.0_RC2-28-flex_3.5.0.12683.swc" />
|
|
||||||
<property name="flexunit-uilistener.swc" value="../lib/ext/flexunit-uilistener-4.1.0_RC2-28-flex_3.5.0.12683.swc" />
|
|
||||||
<property name="flexunit-cilistener.swc" value="../lib/ext/flexunit-cilistener-4.1.0_RC2-28-flex_3.5.0.12683.swc" />-->
|
|
||||||
|
|
||||||
<!-- Flex Ant Tasks used to perform compc and mxml compiling more info at http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks -->
|
|
||||||
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
|
|
||||||
|
|
||||||
<target name="setup" description="perform an setup operations"/>
|
|
||||||
|
|
||||||
<!-- Execute the ASDoc Compile which runs 3 separate tasks in a series -->
|
|
||||||
<target name="compile" description="series of tasks to create docs and swc">
|
|
||||||
|
|
||||||
<!--<antcall target="cleanDir" description="clean the docs directory"/>-->
|
|
||||||
|
|
||||||
<!--<antcall target="asDocs" description="full build of asdocs"/>-->
|
|
||||||
|
|
||||||
<antcall target="buildSWC" description="build the SWC file"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="deploy" description="perform an deployment operations"/>
|
|
||||||
|
|
||||||
<target name="install" description="perform an installation operations"/>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
DELETE the existing output folder and files and then re-generate the output folder
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="clean"
|
|
||||||
description="DELETE the existing output folder and files and then re-generate the output folder">
|
|
||||||
|
|
||||||
<delete dir="${basedir}/${docsoutputfolder}" failonerror="true" includeemptydirs="true"/>
|
|
||||||
<delete file="${basedir}/${liboutputfolder}/${liboutputfile}"/>
|
|
||||||
<delete dir="${basedir}/dist" failonerror="true" includeemptydirs="true"/>
|
|
||||||
|
|
||||||
<mkdir dir="${basedir}/${docsoutputfolder}"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
Run the ASDoc executable and generate the ASDocs to the new output folder
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="docs" description="Run the ASDoc executable and generate the ASDocs to the new output folder">
|
|
||||||
|
|
||||||
<exec executable="${FLEX_HOME}/bin/asdoc" failonerror="true">
|
|
||||||
|
|
||||||
<arg line="-doc-sources ${sourcepath}"/>
|
|
||||||
<arg line="-source-path ${sourcepath}"/>
|
|
||||||
<arg line="-footer 'Copyright Wordnik'"/>
|
|
||||||
<arg line="-package org.openapitools.api 'Contains the apis which are used by clients to make calls to the services deployed'"/>
|
|
||||||
<arg line="-package org.openapitools.codegen.model 'Contains common classes which encapsulate data elements required'"/>
|
|
||||||
<arg line="-package org.openapitools.common 'Contains classes which are used by the api classes to invoke the deployed api like OpenApi - a base class, ApiUserCredentials, etc.'"/>
|
|
||||||
<arg line="-package org.openapitools.event 'Results of calls made to Wordnik are returned via dispatched events. This package contains such event classes. Right now thats just ApiClientEvent and Response.'"/>
|
|
||||||
<arg line="-package org.openapitools.exception 'Contains classes that encapsulate the errors generated'"/>
|
|
||||||
|
|
||||||
<arg value="-window-title"/>
|
|
||||||
<arg value="${title}"/>
|
|
||||||
|
|
||||||
<arg value="-main-title"/>
|
|
||||||
<arg value="${title}"/>
|
|
||||||
|
|
||||||
<arg value="-output"/>
|
|
||||||
<arg value="${basedir}/${docsoutputfolder}"/>
|
|
||||||
|
|
||||||
<arg value="-external-library-path"/>
|
|
||||||
<arg value="${basedir}/${libpath}"/>
|
|
||||||
|
|
||||||
</exec>
|
|
||||||
|
|
||||||
<echo>docs created</echo>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
Compile the SWC file library including lib folder and the path to our classes, we use compc for library,
|
|
||||||
check the docs for Flex Ant Tasks, http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<target name="buildSWC" description="Compile the SWC file for the Librayr Project">
|
|
||||||
|
|
||||||
<compc output="${basedir}/${liboutputfolder}/${liboutputfile}">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Include the path to any external SWC files used in the sdk, you may have to place name of SWC (ASAXB-0.1.1.swc) at end of path.
|
|
||||||
So file path would be file="${basedir}/${libpath}/ASAXB-0.1.1.swc"
|
|
||||||
-->
|
|
||||||
<include-libraries file="${basedir}/${libpath}/"/>
|
|
||||||
|
|
||||||
<source-path path-element="${sourcepath}"/>
|
|
||||||
|
|
||||||
<keep-as3-metadata name="XmlRootNode"/>
|
|
||||||
<keep-as3-metadata name="XmlElement"/>
|
|
||||||
<keep-as3-metadata name="XmlElements"/>
|
|
||||||
|
|
||||||
<!-- include our Class packages into the build (com folder) -->
|
|
||||||
<include-sources dir="${sourcepath}" includes="*"/>
|
|
||||||
|
|
||||||
</compc>
|
|
||||||
|
|
||||||
<echo>SWC created</echo>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="dist" depends="clean, buildSWC, docs">
|
|
||||||
<mkdir dir="${basedir}/dist/lib"/>
|
|
||||||
<mkdir dir="${basedir}/dist/docs"/>
|
|
||||||
<mkdir dir="${basedir}/dist/sample"/>
|
|
||||||
|
|
||||||
<copy file="${basedir}/${liboutputfolder}/${liboutputfile}" todir="${basedir}/dist/lib/">
|
|
||||||
</copy>
|
|
||||||
<copy todir="${basedir}/dist/docs/">
|
|
||||||
<fileset dir="${basedir}/asdoc"/>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
|
|
||||||
<zip destfile="sample-as3-sdk.zip" basedir="${basedir}/dist"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Compiles and creates a test app that can be run using the adl - AIR Debug Launcher from command line
|
|
||||||
Note: For the output file to be executed an xml file is needed which points to this output swf - this is not
|
|
||||||
generated here
|
|
||||||
-->
|
|
||||||
<target name="compile-test" depends="buildSWC">
|
|
||||||
<property name="FLEX_HOME" value="${FLEX4_SDK_HOME}"/>
|
|
||||||
<mxmlc
|
|
||||||
static-rsls="false"
|
|
||||||
fork="true"
|
|
||||||
maxmemory="512m"
|
|
||||||
file="${testsourcepath}/AirExecutorApp.mxml"
|
|
||||||
output="${basedir}/${liboutputfolder}/AirExecutorApp.swf"
|
|
||||||
warnings="false"
|
|
||||||
configname="air"
|
|
||||||
locale="en_US">
|
|
||||||
<load-config filename="${FLEX4_HOME}/frameworks/air-config.xml"/>
|
|
||||||
<source-path path-element="${FLEX_HOME}/frameworks"/>
|
|
||||||
|
|
||||||
<compiler.debug>true</compiler.debug>
|
|
||||||
|
|
||||||
|
|
||||||
<source-path path-element="${testsourcepath}"/>
|
|
||||||
<!--<source-path path-element="${APP_ROOT}/locale/{locale}" />-->
|
|
||||||
|
|
||||||
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
|
|
||||||
<include name="*.swc"/>
|
|
||||||
</library-path>
|
|
||||||
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
|
|
||||||
<include name="*.swc"/>
|
|
||||||
</library-path>
|
|
||||||
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
|
|
||||||
<include name="{locale}"/>
|
|
||||||
</library-path>
|
|
||||||
<library-path dir="${basedir}/${libpath}" append="true">
|
|
||||||
<include name="*.swc"/>
|
|
||||||
</library-path>
|
|
||||||
<library-path dir="${basedir}/${liboutputfolder}" append="true">
|
|
||||||
<include name="*.swc"/>
|
|
||||||
</library-path>
|
|
||||||
<library-path dir="${basedir}/${libpath}/ext" append="true">
|
|
||||||
<include name="*.swc"/>
|
|
||||||
</library-path>
|
|
||||||
|
|
||||||
<verbose-stacktraces>true</verbose-stacktraces>
|
|
||||||
</mxmlc>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="do-test">
|
|
||||||
<exec executable="${FLEX_HOME}/bin/adl" failonerror="true">
|
|
||||||
<arg value="${basedir}/bin/AirExecutorApp-app.xml"/>
|
|
||||||
</exec>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test" depends="compile-test, do-test">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,303 +0,0 @@
|
|||||||
package org.openapitools.client.api {
|
|
||||||
|
|
||||||
import org.openapitools.common.ApiInvoker;
|
|
||||||
import org.openapitools.exception.ApiErrorCodes;
|
|
||||||
import org.openapitools.exception.ApiError;
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
import org.openapitools.event.Response;
|
|
||||||
import org.openapitools.common.OpenApi;
|
|
||||||
import org.openapitools.client.model.ApiResponse;
|
|
||||||
import flash.filesystem.File;
|
|
||||||
import org.openapitools.client.model.Pet;
|
|
||||||
|
|
||||||
import mx.rpc.AsyncToken;
|
|
||||||
import mx.utils.UIDUtil;
|
|
||||||
import flash.utils.Dictionary;
|
|
||||||
import flash.events.EventDispatcher;
|
|
||||||
|
|
||||||
public class PetApi extends OpenApi {
|
|
||||||
/**
|
|
||||||
* Constructor for the PetApi api client
|
|
||||||
* @param apiCredentials Wrapper object for tokens and hostName required towards authentication
|
|
||||||
* @param eventDispatcher Optional event dispatcher that when provided is used by the SDK to dispatch any Response
|
|
||||||
*/
|
|
||||||
public function PetApi(apiCredentials: ApiUserCredentials, eventDispatcher: EventDispatcher = null) {
|
|
||||||
super(apiCredentials, eventDispatcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static const event_add_pet: String = "add_pet";
|
|
||||||
public static const event_delete_pet: String = "delete_pet";
|
|
||||||
public static const event_find_pets_by_status: String = "find_pets_by_status";
|
|
||||||
public static const event_find_pets_by_tags: String = "find_pets_by_tags";
|
|
||||||
public static const event_get_pet_by_id: String = "get_pet_by_id";
|
|
||||||
public static const event_update_pet: String = "update_pet";
|
|
||||||
public static const event_update_pet_with_form: String = "update_pet_with_form";
|
|
||||||
public static const event_upload_file: String = "upload_file";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function add_pet (pet: Pet): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, pet, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "add_pet";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function delete_pet (petId: Number, apiKey: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
headerParams["api_key"] = toPathValue(apiKey);
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "DELETE", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "delete_pet";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Array
|
|
||||||
*/
|
|
||||||
public function find_pets_by_status (status: Array): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/findByStatus".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
if("null" != String(status))
|
|
||||||
queryParams["status"] = toPathValue(status);
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "find_pets_by_status";
|
|
||||||
|
|
||||||
token.returnType = Array;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Array
|
|
||||||
*/
|
|
||||||
public function find_pets_by_tags (tags: Array): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/findByTags".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
if("null" != String(tags))
|
|
||||||
queryParams["tags"] = toPathValue(tags);
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "find_pets_by_tags";
|
|
||||||
|
|
||||||
token.returnType = Array;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Pet
|
|
||||||
*/
|
|
||||||
public function get_pet_by_id (petId: Number): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "get_pet_by_id";
|
|
||||||
|
|
||||||
token.returnType = Pet;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function update_pet (pet: Pet): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "PUT", queryParams, pet, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "update_pet";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function update_pet_with_form (petId: Number, name: String, status: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/{petId}".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "update_pet_with_form";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns ApiResponse
|
|
||||||
*/
|
|
||||||
public function upload_file (petId: Number, additionalMetadata: String, file: File): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/pet/{petId}/uploadImage".replace(/{format}/g,"xml").replace("{" + "petId" + "}", getApiInvoker().escapeString(petId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "upload_file";
|
|
||||||
|
|
||||||
token.returnType = ApiResponse;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,148 +0,0 @@
|
|||||||
package org.openapitools.client.api {
|
|
||||||
|
|
||||||
import org.openapitools.common.ApiInvoker;
|
|
||||||
import org.openapitools.exception.ApiErrorCodes;
|
|
||||||
import org.openapitools.exception.ApiError;
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
import org.openapitools.event.Response;
|
|
||||||
import org.openapitools.common.OpenApi;
|
|
||||||
import org.openapitools.client.model.Order;
|
|
||||||
|
|
||||||
import mx.rpc.AsyncToken;
|
|
||||||
import mx.utils.UIDUtil;
|
|
||||||
import flash.utils.Dictionary;
|
|
||||||
import flash.events.EventDispatcher;
|
|
||||||
|
|
||||||
public class StoreApi extends OpenApi {
|
|
||||||
/**
|
|
||||||
* Constructor for the StoreApi api client
|
|
||||||
* @param apiCredentials Wrapper object for tokens and hostName required towards authentication
|
|
||||||
* @param eventDispatcher Optional event dispatcher that when provided is used by the SDK to dispatch any Response
|
|
||||||
*/
|
|
||||||
public function StoreApi(apiCredentials: ApiUserCredentials, eventDispatcher: EventDispatcher = null) {
|
|
||||||
super(apiCredentials, eventDispatcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static const event_delete_order: String = "delete_order";
|
|
||||||
public static const event_get_inventory: String = "get_inventory";
|
|
||||||
public static const event_get_order_by_id: String = "get_order_by_id";
|
|
||||||
public static const event_place_order: String = "place_order";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function delete_order (orderId: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/store/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "DELETE", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "delete_order";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Dictionary
|
|
||||||
*/
|
|
||||||
public function get_inventory (): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/store/inventory".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "get_inventory";
|
|
||||||
|
|
||||||
token.returnType = Dictionary;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Order
|
|
||||||
*/
|
|
||||||
public function get_order_by_id (orderId: Number): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/store/order/{orderId}".replace(/{format}/g,"xml").replace("{" + "orderId" + "}", getApiInvoker().escapeString(orderId));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "get_order_by_id";
|
|
||||||
|
|
||||||
token.returnType = Order;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns Order
|
|
||||||
*/
|
|
||||||
public function place_order (order: Order): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/store/order".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, order, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "place_order";
|
|
||||||
|
|
||||||
token.returnType = Order;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,284 +0,0 @@
|
|||||||
package org.openapitools.client.api {
|
|
||||||
|
|
||||||
import org.openapitools.common.ApiInvoker;
|
|
||||||
import org.openapitools.exception.ApiErrorCodes;
|
|
||||||
import org.openapitools.exception.ApiError;
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
import org.openapitools.event.Response;
|
|
||||||
import org.openapitools.common.OpenApi;
|
|
||||||
import org.openapitools.client.model.User;
|
|
||||||
|
|
||||||
import mx.rpc.AsyncToken;
|
|
||||||
import mx.utils.UIDUtil;
|
|
||||||
import flash.utils.Dictionary;
|
|
||||||
import flash.events.EventDispatcher;
|
|
||||||
|
|
||||||
public class UserApi extends OpenApi {
|
|
||||||
/**
|
|
||||||
* Constructor for the UserApi api client
|
|
||||||
* @param apiCredentials Wrapper object for tokens and hostName required towards authentication
|
|
||||||
* @param eventDispatcher Optional event dispatcher that when provided is used by the SDK to dispatch any Response
|
|
||||||
*/
|
|
||||||
public function UserApi(apiCredentials: ApiUserCredentials, eventDispatcher: EventDispatcher = null) {
|
|
||||||
super(apiCredentials, eventDispatcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static const event_create_user: String = "create_user";
|
|
||||||
public static const event_create_users_with_array_input: String = "create_users_with_array_input";
|
|
||||||
public static const event_create_users_with_list_input: String = "create_users_with_list_input";
|
|
||||||
public static const event_delete_user: String = "delete_user";
|
|
||||||
public static const event_get_user_by_name: String = "get_user_by_name";
|
|
||||||
public static const event_login_user: String = "login_user";
|
|
||||||
public static const event_logout_user: String = "logout_user";
|
|
||||||
public static const event_update_user: String = "update_user";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function create_user (user: User): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, user, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "create_user";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function create_users_with_array_input (user: Array): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/createWithArray".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, user, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "create_users_with_array_input";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function create_users_with_list_input (user: Array): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/createWithList".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "POST", queryParams, user, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "create_users_with_list_input";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function delete_user (username: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "DELETE", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "delete_user";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns User
|
|
||||||
*/
|
|
||||||
public function get_user_by_name (username: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "get_user_by_name";
|
|
||||||
|
|
||||||
token.returnType = User;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns String
|
|
||||||
*/
|
|
||||||
public function login_user (username: String, password: String): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/login".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
if("null" != String(username))
|
|
||||||
queryParams["username"] = toPathValue(username);
|
|
||||||
if("null" != String(password))
|
|
||||||
queryParams["password"] = toPathValue(password);
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "login_user";
|
|
||||||
|
|
||||||
token.returnType = String;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function logout_user (): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/logout".replace(/{format}/g,"xml");
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "GET", queryParams, null, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "logout_user";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns void
|
|
||||||
*/
|
|
||||||
public function update_user (username: String, user: User): String {
|
|
||||||
// create path and map variables
|
|
||||||
var path: String = "/user/{username}".replace(/{format}/g,"xml").replace("{" + "username" + "}", getApiInvoker().escapeString(username));
|
|
||||||
|
|
||||||
// query params
|
|
||||||
var queryParams: Dictionary = new Dictionary();
|
|
||||||
var headerParams: Dictionary = new Dictionary();
|
|
||||||
|
|
||||||
// verify required params are set
|
|
||||||
if( // verify required params are set
|
|
||||||
if() {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
throw new ApiError(400, "missing required params");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var token:AsyncToken = getApiInvoker().invokeAPI(path, "PUT", queryParams, user, headerParams);
|
|
||||||
|
|
||||||
var requestId: String = getUniqueId();
|
|
||||||
|
|
||||||
token.requestId = requestId;
|
|
||||||
token.completionEventType = "update_user";
|
|
||||||
|
|
||||||
token.returnType = null ;
|
|
||||||
return requestId;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRootNode(name="ApiResponse")]
|
|
||||||
public class ApiResponse {
|
|
||||||
[XmlElement(name="code")]
|
|
||||||
public var code: Number = 0;
|
|
||||||
[XmlElement(name="type")]
|
|
||||||
public var type: String = null;
|
|
||||||
[XmlElement(name="message")]
|
|
||||||
public var message: String = null;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "ApiResponse: ";
|
|
||||||
str += " (code: " + code + ")";
|
|
||||||
str += " (type: " + type + ")";
|
|
||||||
str += " (message: " + message + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
|
|
||||||
public class ApiResponseList implements ListWrapper {
|
|
||||||
// This declaration below of _ApiResponse_obj_class is to force flash compiler to include this class
|
|
||||||
private var _apiResponse_obj_class: org.openapitools.client.model.ApiResponse = null;
|
|
||||||
[XmlElements(name="apiResponse", type="org.openapitools.client.model.ApiResponse")]
|
|
||||||
public var apiResponse: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return apiResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRootNode(name="Category")]
|
|
||||||
public class Category {
|
|
||||||
[XmlElement(name="id")]
|
|
||||||
public var id: Number = 0;
|
|
||||||
[XmlElement(name="name")]
|
|
||||||
public var name: String = null;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "Category: ";
|
|
||||||
str += " (id: " + id + ")";
|
|
||||||
str += " (name: " + name + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
|
|
||||||
public class CategoryList implements ListWrapper {
|
|
||||||
// This declaration below of _Category_obj_class is to force flash compiler to include this class
|
|
||||||
private var _category_obj_class: org.openapitools.client.model.Category = null;
|
|
||||||
[XmlElements(name="category", type="org.openapitools.client.model.Category")]
|
|
||||||
public var category: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return category;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRootNode(name="Order")]
|
|
||||||
public class Order {
|
|
||||||
[XmlElement(name="id")]
|
|
||||||
public var id: Number = 0;
|
|
||||||
[XmlElement(name="petId")]
|
|
||||||
public var petId: Number = 0;
|
|
||||||
[XmlElement(name="quantity")]
|
|
||||||
public var quantity: Number = 0;
|
|
||||||
[XmlElement(name="shipDate")]
|
|
||||||
public var shipDate: Date = null;
|
|
||||||
/* Order Status */
|
|
||||||
[XmlElement(name="status")]
|
|
||||||
public var status: String = null;
|
|
||||||
[XmlElement(name="complete")]
|
|
||||||
public var complete: Boolean = false;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "Order: ";
|
|
||||||
str += " (id: " + id + ")";
|
|
||||||
str += " (petId: " + petId + ")";
|
|
||||||
str += " (quantity: " + quantity + ")";
|
|
||||||
str += " (shipDate: " + shipDate + ")";
|
|
||||||
str += " (status: " + status + ")";
|
|
||||||
str += " (complete: " + complete + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
|
|
||||||
public class OrderList implements ListWrapper {
|
|
||||||
// This declaration below of _Order_obj_class is to force flash compiler to include this class
|
|
||||||
private var _order_obj_class: org.openapitools.client.model.Order = null;
|
|
||||||
[XmlElements(name="order", type="org.openapitools.client.model.Order")]
|
|
||||||
public var order: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return order;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.client.model.Category;
|
|
||||||
import org.openapitools.client.model.Tag;
|
|
||||||
|
|
||||||
[XmlRootNode(name="Pet")]
|
|
||||||
public class Pet {
|
|
||||||
[XmlElement(name="id")]
|
|
||||||
public var id: Number = 0;
|
|
||||||
[XmlElement(name="category")]
|
|
||||||
public var category: Category = NaN;
|
|
||||||
[XmlElement(name="name")]
|
|
||||||
public var name: String = null;
|
|
||||||
// This declaration below of _photoUrls_obj_class is to force flash compiler to include this class
|
|
||||||
private var _photoUrls_obj_class: Array = null;
|
|
||||||
[XmlElementWrapper(name="photoUrls")]
|
|
||||||
[XmlElements(name="photoUrls", type="Array")]
|
|
||||||
public var photoUrls: Array = new Array();
|
|
||||||
// This declaration below of _tags_obj_class is to force flash compiler to include this class
|
|
||||||
private var _tags_obj_class: Array = null;
|
|
||||||
[XmlElementWrapper(name="tags")]
|
|
||||||
[XmlElements(name="tags", type="Array")]
|
|
||||||
public var tags: Array = new Array();
|
|
||||||
/* pet status in the store */
|
|
||||||
[XmlElement(name="status")]
|
|
||||||
public var status: String = null;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "Pet: ";
|
|
||||||
str += " (id: " + id + ")";
|
|
||||||
str += " (category: " + category + ")";
|
|
||||||
str += " (name: " + name + ")";
|
|
||||||
str += " (photoUrls: " + photoUrls + ")";
|
|
||||||
str += " (tags: " + tags + ")";
|
|
||||||
str += " (status: " + status + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
import org.openapitools.client.model.Category;
|
|
||||||
import org.openapitools.client.model.Tag;
|
|
||||||
|
|
||||||
public class PetList implements ListWrapper {
|
|
||||||
// This declaration below of _Pet_obj_class is to force flash compiler to include this class
|
|
||||||
private var _pet_obj_class: org.openapitools.client.model.Pet = null;
|
|
||||||
[XmlElements(name="pet", type="org.openapitools.client.model.Pet")]
|
|
||||||
public var pet: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return pet;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRootNode(name="Tag")]
|
|
||||||
public class Tag {
|
|
||||||
[XmlElement(name="id")]
|
|
||||||
public var id: Number = 0;
|
|
||||||
[XmlElement(name="name")]
|
|
||||||
public var name: String = null;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "Tag: ";
|
|
||||||
str += " (id: " + id + ")";
|
|
||||||
str += " (name: " + name + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
|
|
||||||
public class TagList implements ListWrapper {
|
|
||||||
// This declaration below of _Tag_obj_class is to force flash compiler to include this class
|
|
||||||
private var _tag_obj_class: org.openapitools.client.model.Tag = null;
|
|
||||||
[XmlElements(name="tag", type="org.openapitools.client.model.Tag")]
|
|
||||||
public var tag: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
|
|
||||||
[XmlRootNode(name="User")]
|
|
||||||
public class User {
|
|
||||||
[XmlElement(name="id")]
|
|
||||||
public var id: Number = 0;
|
|
||||||
[XmlElement(name="username")]
|
|
||||||
public var username: String = null;
|
|
||||||
[XmlElement(name="firstName")]
|
|
||||||
public var firstName: String = null;
|
|
||||||
[XmlElement(name="lastName")]
|
|
||||||
public var lastName: String = null;
|
|
||||||
[XmlElement(name="email")]
|
|
||||||
public var email: String = null;
|
|
||||||
[XmlElement(name="password")]
|
|
||||||
public var password: String = null;
|
|
||||||
[XmlElement(name="phone")]
|
|
||||||
public var phone: String = null;
|
|
||||||
/* User Status */
|
|
||||||
[XmlElement(name="userStatus")]
|
|
||||||
public var userStatus: Number = 0;
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
var str: String = "User: ";
|
|
||||||
str += " (id: " + id + ")";
|
|
||||||
str += " (username: " + username + ")";
|
|
||||||
str += " (firstName: " + firstName + ")";
|
|
||||||
str += " (lastName: " + lastName + ")";
|
|
||||||
str += " (email: " + email + ")";
|
|
||||||
str += " (password: " + password + ")";
|
|
||||||
str += " (phone: " + phone + ")";
|
|
||||||
str += " (userStatus: " + userStatus + ")";
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
package org.openapitools.client.model {
|
|
||||||
|
|
||||||
import org.openapitools.common.ListWrapper;
|
|
||||||
|
|
||||||
public class UserList implements ListWrapper {
|
|
||||||
// This declaration below of _User_obj_class is to force flash compiler to include this class
|
|
||||||
private var _user_obj_class: org.openapitools.client.model.User = null;
|
|
||||||
[XmlElements(name="user", type="org.openapitools.client.model.User")]
|
|
||||||
public var user: Array = new Array();
|
|
||||||
|
|
||||||
public function getList(): Array{
|
|
||||||
return user;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,276 +0,0 @@
|
|||||||
package org.openapitools.common {
|
|
||||||
import org.openapitools.event.ApiClientEvent;
|
|
||||||
import org.openapitools.event.Response;
|
|
||||||
|
|
||||||
import flash.events.EventDispatcher;
|
|
||||||
import flash.utils.*;
|
|
||||||
import mx.rpc.AsyncToken;
|
|
||||||
import mx.rpc.events.ResultEvent;
|
|
||||||
import mx.rpc.events.FaultEvent;
|
|
||||||
import mx.utils.ObjectUtil;
|
|
||||||
import mx.rpc.http.HTTPService;
|
|
||||||
import mx.messaging.messages.HTTPRequestMessage;
|
|
||||||
import mx.messaging.ChannelSet;
|
|
||||||
import mx.messaging.channels.DirectHTTPChannel;
|
|
||||||
import asaxb.xml.bind.ASAXBContext;
|
|
||||||
import asaxb.xml.bind.Unmarshaller;
|
|
||||||
|
|
||||||
public class ApiInvoker extends EventDispatcher {
|
|
||||||
|
|
||||||
private static const DELETE_DATA_DUMMY:String = "dummyDataRequiredForDeleteOverride";
|
|
||||||
private static const X_HTTP_OVERRIDE_KEY:String = "X-HTTP-Method-Override";
|
|
||||||
private static const CONTENT_TYPE_HEADER_KEY:String = "Content-Type";
|
|
||||||
|
|
||||||
public function ApiInvoker(apiUsageCredentials:ApiUserCredentials, eventNotifier:EventDispatcher, useProxy:Boolean = true) {
|
|
||||||
_apiUsageCredentials = apiUsageCredentials;
|
|
||||||
_useProxyServer = useProxy;
|
|
||||||
if (_apiUsageCredentials.hostName != null) {
|
|
||||||
_proxyHostName = _apiUsageCredentials.hostName;
|
|
||||||
}
|
|
||||||
_apiPath = _apiUsageCredentials.apiPath;
|
|
||||||
_proxyPath = _apiUsageCredentials.proxyPath;
|
|
||||||
_apiProxyServerUrl = _apiUsageCredentials.apiProxyServerUrl;
|
|
||||||
_apiEventNotifier = eventNotifier;
|
|
||||||
}
|
|
||||||
public var _apiEventNotifier:EventDispatcher;
|
|
||||||
internal var _apiProxyServerUrl:String = "";
|
|
||||||
internal var _useProxyServer:Boolean = true;
|
|
||||||
private var _apiUsageCredentials:ApiUserCredentials;
|
|
||||||
private var _baseUrl:String = "";
|
|
||||||
private var _proxyHostName:String = "";
|
|
||||||
private var _apiPath:String = "";
|
|
||||||
private var _proxyPath:String = "";
|
|
||||||
|
|
||||||
public function invokeAPI(resourceURL:String, method:String, queryParams:Dictionary, postObject:Object, headerParams:Dictionary):AsyncToken {
|
|
||||||
//make the communication
|
|
||||||
if (_useProxyServer) {
|
|
||||||
resourceURL = _apiProxyServerUrl + resourceURL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
resourceURL = "http://" + _proxyHostName + _apiPath + resourceURL;
|
|
||||||
}
|
|
||||||
|
|
||||||
var counter:int = 0;
|
|
||||||
var symbol:String = "&";
|
|
||||||
var paramValue:Object;
|
|
||||||
for (var paramName:String in queryParams) {
|
|
||||||
paramValue = queryParams[paramName];
|
|
||||||
//var key:String = paramName;
|
|
||||||
// do stuff
|
|
||||||
symbol = "&";
|
|
||||||
if (counter == 0) {
|
|
||||||
symbol = "?";
|
|
||||||
}
|
|
||||||
resourceURL = resourceURL + symbol + paramName + "=" + paramValue.toString();
|
|
||||||
counter++;
|
|
||||||
|
|
||||||
}
|
|
||||||
// trace(resourceURL);
|
|
||||||
//create a httpservice and invoke the rest url waiting for response
|
|
||||||
var requestHeader:Object = new Object();
|
|
||||||
if (headerParams != null) {
|
|
||||||
for (var key:String in headerParams) {
|
|
||||||
requestHeader[key] = headerParams[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resourceURL = ApiUrlHelper.appendTokenInfo(resourceURL, requestHeader, _apiUsageCredentials);
|
|
||||||
|
|
||||||
var bodyData:String = marshal(postObject).toString();//restRequest.postData;
|
|
||||||
|
|
||||||
return doRestCall(resourceURL, onApiRequestResult, onApiRequestFault, method, bodyData, requestHeader, "application/xml");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function marshal(source:Object):Object {
|
|
||||||
// trace("marshal got - " + source)
|
|
||||||
if (source is String) {
|
|
||||||
return source;
|
|
||||||
} else if (source is Array && source.length > 0) {
|
|
||||||
var writer:XMLWriter = new XMLWriter();
|
|
||||||
var sourceArray:Array = source as Array;
|
|
||||||
var arrayEnclosure:String = getArrayEnclosure(sourceArray);
|
|
||||||
writer.xml.setName(arrayEnclosure);
|
|
||||||
|
|
||||||
for (var i:int = 0; i < sourceArray.length; i++) {
|
|
||||||
var o:Object = sourceArray[i];
|
|
||||||
writer.xml.appendChild(marshal(o));
|
|
||||||
}
|
|
||||||
return writer.xml;
|
|
||||||
} else
|
|
||||||
return marshalObject(source);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function marshalObject(source:Object):XML {
|
|
||||||
var writer:XMLWriter = new XMLWriter();
|
|
||||||
var objDescriptor:XML = describeType(source);
|
|
||||||
var property:XML;
|
|
||||||
var propertyType:String;
|
|
||||||
var propertyValue:Object;
|
|
||||||
|
|
||||||
var qualifiedClassName:String = objDescriptor.@name;
|
|
||||||
qualifiedClassName = qualifiedClassName.replace("::", ".");
|
|
||||||
var className:String = qualifiedClassName.substring(qualifiedClassName.lastIndexOf(".") + 1);
|
|
||||||
className = className.toLowerCase() + className.substring(1);
|
|
||||||
writer.xml.setName(className);
|
|
||||||
|
|
||||||
for each(property in objDescriptor.elements("variable")) {
|
|
||||||
propertyValue = source[property.@name];
|
|
||||||
if (propertyValue != null) {
|
|
||||||
if (ObjectUtil.isSimple(propertyValue)) {
|
|
||||||
writer.addProperty(property.@name, propertyValue.toString());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
writer.addProperty(property.@name, marshal(propertyValue).toXMLString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for each(property in objDescriptor.elements("accessor")) {
|
|
||||||
if (property.@access == "readonly") {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
propertyValue = source[property.@name];
|
|
||||||
if (source[property.@name] != null) {
|
|
||||||
if (ObjectUtil.isSimple(propertyValue)) {
|
|
||||||
writer.addProperty(property.@name, propertyValue.toString());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
writer.addProperty(property.@name, marshal(propertyValue).toXMLString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return writer.xml;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function escapeString(str:String):String {
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function doRestCall(url:String, resultFunction:Function, faultFunction:Function = null,
|
|
||||||
restMethod:String = "GET",
|
|
||||||
bodyData:Object = null, headers:Object = null, contentType:String = "application/xml"):AsyncToken {
|
|
||||||
var httpService:HTTPService = new HTTPService();
|
|
||||||
|
|
||||||
if (headers == null) {
|
|
||||||
headers = new Object();
|
|
||||||
}
|
|
||||||
httpService.method = restMethod;
|
|
||||||
|
|
||||||
if (restMethod.toUpperCase() != HTTPRequestMessage.GET_METHOD) {
|
|
||||||
//httpService.method = HTTPRequestMessage.POST_METHOD; - not required as we're using the proxy
|
|
||||||
if (bodyData == null) {
|
|
||||||
bodyData = new Object();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restMethod == HTTPRequestMessage.DELETE_METHOD) {
|
|
||||||
headers[X_HTTP_OVERRIDE_KEY] = HTTPRequestMessage.DELETE_METHOD;
|
|
||||||
bodyData = DELETE_DATA_DUMMY;
|
|
||||||
}
|
|
||||||
else if (restMethod == HTTPRequestMessage.PUT_METHOD) {
|
|
||||||
headers[X_HTTP_OVERRIDE_KEY] = HTTPRequestMessage.PUT_METHOD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
headers[CONTENT_TYPE_HEADER_KEY] = contentType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//if the request type is GET and content type is xml then the Flex HTTPService converts it to a POST ... yeah
|
|
||||||
contentType = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
httpService.url = url;
|
|
||||||
httpService.contentType = contentType;
|
|
||||||
httpService.resultFormat = "e4x";
|
|
||||||
httpService.headers = headers;
|
|
||||||
httpService.addEventListener(ResultEvent.RESULT, resultFunction);
|
|
||||||
if (faultFunction != null) {
|
|
||||||
httpService.addEventListener(FaultEvent.FAULT, faultFunction);
|
|
||||||
}
|
|
||||||
if (_useProxyServer) {
|
|
||||||
httpService.useProxy = true;
|
|
||||||
|
|
||||||
var channelSet:ChannelSet = new ChannelSet();
|
|
||||||
var httpChannel:DirectHTTPChannel = new DirectHTTPChannel("");
|
|
||||||
httpChannel.uri = ApiUrlHelper.getProxyUrl(_proxyHostName, _proxyPath);
|
|
||||||
channelSet.addChannel(httpChannel);
|
|
||||||
httpService.channelSet = channelSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
return httpService.send(bodyData);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function onApiRequestResult(event:ResultEvent):void {
|
|
||||||
|
|
||||||
// I put this in comments. Here, it's trying to parse XML and it fails if it's not XML.
|
|
||||||
// Therefore, it's better to have the raw result that we can parse as we want.
|
|
||||||
// TODO: Create different parser (JSON, XML, etc.)
|
|
||||||
/*
|
|
||||||
var completionListener:Function = event.token.completionListener;
|
|
||||||
var result:Object = event.result;
|
|
||||||
var resultType:Class = event.token.returnType;
|
|
||||||
var resultObject:Object;
|
|
||||||
if (resultType != null) {
|
|
||||||
var context:ASAXBContext = ASAXBContext.newInstance(resultType);
|
|
||||||
var unmarshaller:Unmarshaller = context.createUnmarshaller();
|
|
||||||
var resultXML:XML = new XML(event.result);
|
|
||||||
try {
|
|
||||||
resultObject = unmarshaller.unmarshal(resultXML);
|
|
||||||
}
|
|
||||||
catch (error:TypeError) {
|
|
||||||
var errorResponse:Response = new Response(false, null, "Could not unmarshall response");
|
|
||||||
if (_apiEventNotifier != null) { //dispatch event via assigned dispatcher
|
|
||||||
var failureEvent:ApiClientEvent = new ApiClientEvent(event.token.completionEventType);
|
|
||||||
failureEvent.response = errorResponse;
|
|
||||||
_apiEventNotifier.dispatchEvent(failureEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resultObject is ListWrapper) {
|
|
||||||
resultObject = ListWrapper(resultObject).getList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var response:Response = new Response(true, resultObject);
|
|
||||||
*/
|
|
||||||
|
|
||||||
var response:Response = new Response(true, event.result);
|
|
||||||
response.requestId = event.token.requestId;
|
|
||||||
var successEventType:String = event.token.completionEventType != null ? event.token.completionEventType : ApiClientEvent.SUCCESS_EVENT;
|
|
||||||
|
|
||||||
if (_apiEventNotifier != null) { //dispatch event via assigned dispatcher
|
|
||||||
var successEvent:ApiClientEvent = new ApiClientEvent(successEventType);
|
|
||||||
successEvent.response = response;
|
|
||||||
_apiEventNotifier.dispatchEvent(successEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function onApiRequestFault(event:FaultEvent):void {
|
|
||||||
var completionListener:Function = event.token.completionListener;
|
|
||||||
if (completionListener != null) {
|
|
||||||
completionListener.call(null, new Response(false, null, event.fault.faultString));
|
|
||||||
}
|
|
||||||
|
|
||||||
var failureEventType:String = event.token.completionEventType != null ? event.token.completionEventType : ApiClientEvent.FAILURE_EVENT;
|
|
||||||
|
|
||||||
if (_apiEventNotifier != null) { //dispatch event via assigned dispatcher
|
|
||||||
var failureEvent:ApiClientEvent = new ApiClientEvent(failureEventType);
|
|
||||||
failureEvent.response = new Response(false, null, event.fault.faultString);
|
|
||||||
_apiEventNotifier.dispatchEvent(failureEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getArrayEnclosure(arr:Array):String {
|
|
||||||
if (arr != null && arr.length > 0) {
|
|
||||||
var className:String = flash.utils.getQualifiedClassName(arr[0])
|
|
||||||
if (className.indexOf("::") > 0)
|
|
||||||
className = className.substr(className.indexOf("::") + 2, className.length)
|
|
||||||
|
|
||||||
return className.substring(0, 1).toLowerCase() + className.substring(1, className.length) + "s";
|
|
||||||
} else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
package org.openapitools.common {
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
* Internal class for the Rest client
|
|
||||||
*/
|
|
||||||
internal class ApiUrlHelper {
|
|
||||||
|
|
||||||
private static const API_URL_KEY:String = "api_key";
|
|
||||||
private static const AUTH_TOKEN_URL_KEY:String = "auth_token";
|
|
||||||
|
|
||||||
private static const HTTP_URL_PREFIX:String = "http://";
|
|
||||||
|
|
||||||
internal static function appendTokenInfo(restUrl:String, requestHeader: Object, credentials: ApiUserCredentials): String {
|
|
||||||
//checks for the presence api credentials on client initialization and not repeated here
|
|
||||||
if(restUrl.indexOf("?") == -1){
|
|
||||||
restUrl += ( "?" + API_URL_KEY + "=" + credentials.apiToken );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
restUrl += ( "&" + API_URL_KEY + "=" + credentials.apiToken );
|
|
||||||
}
|
|
||||||
requestHeader.api_key = credentials.apiToken;
|
|
||||||
|
|
||||||
if(credentials.authToken != null && credentials.authToken != ""){
|
|
||||||
restUrl += ( "&" + AUTH_TOKEN_URL_KEY + "=" + credentials.authToken );
|
|
||||||
requestHeader.auth_token = credentials.authToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
return restUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static function getProxyUrl(hostName: String, proxyPath: String): String{
|
|
||||||
if (hostName..charAt(hostName.length) == "/") //remove trailing slash
|
|
||||||
{
|
|
||||||
hostName = hostName.substring(0, hostName.length - 1);
|
|
||||||
}
|
|
||||||
return HTTP_URL_PREFIX + hostName + proxyPath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
package org.openapitools.common {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Api account credentials.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ApiUserCredentials {
|
|
||||||
/**
|
|
||||||
* An apitoken that is passed along with the requests
|
|
||||||
*/
|
|
||||||
public var apiToken:String;
|
|
||||||
/**
|
|
||||||
* A valid auth_token which could be necessary for certain operations
|
|
||||||
*/
|
|
||||||
public var authToken:String;
|
|
||||||
/**
|
|
||||||
* The userId which could be required for certain operations
|
|
||||||
*/
|
|
||||||
public var userId:Number;
|
|
||||||
/**
|
|
||||||
* The host name for the Rest API eg. api.companyName.com
|
|
||||||
*/
|
|
||||||
public var hostName:String;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The base path to the api resources - used along with the hostname
|
|
||||||
* eg. /v4
|
|
||||||
*/
|
|
||||||
public var apiPath: String;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The base path to the blazeds proxy
|
|
||||||
* eg. /v4/messagebroker/restproxy
|
|
||||||
*/
|
|
||||||
public var proxyPath: String;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If a proxy server has been set up for the services specify the URL here. This value is used when the Api is invoked with
|
|
||||||
* the value useProxy as true
|
|
||||||
*/
|
|
||||||
public var apiProxyServerUrl: String;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor of ApiUserCredentials
|
|
||||||
* @param apiToken An apitoken that is passed along with the requests
|
|
||||||
* @param authToken A valid auth_token which could necessary for certain operations
|
|
||||||
* @param hostName The host name for the Rest API eg. api.companyName.com
|
|
||||||
* @param userId The userId which is required for certain operations - currently, get user lists
|
|
||||||
*/
|
|
||||||
public function ApiUserCredentials(hostName: String, apiPath: String, apiToken: String,
|
|
||||||
authToken: String = null, userId: Number = -1, apiProxyServerUrl: String="",
|
|
||||||
proxyPath: String = null) {
|
|
||||||
this.hostName = hostName;
|
|
||||||
this.apiToken = apiToken;
|
|
||||||
this.authToken = authToken;
|
|
||||||
this.userId = userId;
|
|
||||||
this.apiPath = apiPath;
|
|
||||||
this.apiProxyServerUrl = apiProxyServerUrl;
|
|
||||||
this.proxyPath = proxyPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package org.openapitools.common
|
|
||||||
{
|
|
||||||
public interface ListWrapper
|
|
||||||
{
|
|
||||||
|
|
||||||
function getList(): Array;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,75 +0,0 @@
|
|||||||
package org.openapitools.common
|
|
||||||
{
|
|
||||||
import org.openapitools.common.ApiUserCredentials;
|
|
||||||
|
|
||||||
import flash.events.EventDispatcher;
|
|
||||||
import flash.events.IEventDispatcher;
|
|
||||||
|
|
||||||
import mx.utils.UIDUtil;
|
|
||||||
|
|
||||||
public class OpenApi extends EventDispatcher
|
|
||||||
{
|
|
||||||
|
|
||||||
protected var _apiUsageCredentials:ApiUserCredentials;
|
|
||||||
protected var _apiEventNotifier:EventDispatcher;
|
|
||||||
protected var _apiInvoker: ApiInvoker;
|
|
||||||
|
|
||||||
protected var _useProxyServer: Boolean = false;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor for the api client
|
|
||||||
* @param apiCredentials Wrapper object for tokens and hostName required towards authentication
|
|
||||||
* @param eventDispatcher Optional event dispatcher that when provided is used by the SDK to dispatch any Response
|
|
||||||
*/
|
|
||||||
public function OpenApi(apiCredentials: ApiUserCredentials, eventDispatcher: EventDispatcher = null) {
|
|
||||||
super();
|
|
||||||
_apiUsageCredentials = apiCredentials;
|
|
||||||
_apiEventNotifier = eventDispatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function useProxyServer(value:Boolean, proxyServerUrl: String = null):void {
|
|
||||||
_useProxyServer = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getApiInvoker():ApiInvoker {
|
|
||||||
if(_apiInvoker == null){
|
|
||||||
if(_apiEventNotifier == null){
|
|
||||||
_apiEventNotifier = this;
|
|
||||||
}
|
|
||||||
_apiInvoker = new ApiInvoker(_apiUsageCredentials, _apiEventNotifier, _useProxyServer);
|
|
||||||
}
|
|
||||||
return _apiInvoker;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getUniqueId():String {
|
|
||||||
return UIDUtil.createUID();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method for returning the path value
|
|
||||||
* For a string value an empty value is returned if the value is null
|
|
||||||
* @param value
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
protected static function toPathValue(value: Object): String {
|
|
||||||
if(value is Array){
|
|
||||||
return arrayToPathValue(value as Array);
|
|
||||||
}
|
|
||||||
return value == null ? "" : value.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method for returning a path value
|
|
||||||
* For a list of objects a comma separated string is returned
|
|
||||||
* @param objects
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
protected static function arrayToPathValue(objects: Array): String {
|
|
||||||
var out: String = "";
|
|
||||||
|
|
||||||
return objects.join(",");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package org.openapitools.common
|
|
||||||
{
|
|
||||||
public class XMLWriter
|
|
||||||
{
|
|
||||||
public var xml:XML;
|
|
||||||
|
|
||||||
public function XMLWriter() {
|
|
||||||
xml=<obj/>;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function reset():void {
|
|
||||||
xml=new XML();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addProperty(propertyName:String, propertyValue:String):XML {
|
|
||||||
var xmlProperty:XML=<new/>
|
|
||||||
xmlProperty.setName(propertyName);
|
|
||||||
xmlProperty.appendChild(propertyValue);
|
|
||||||
xml.appendChild(xmlProperty);
|
|
||||||
return xmlProperty;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addAttribute(propertyName:String, attribute:String, attributeValue:String):void {
|
|
||||||
xml.elements(propertyName)[0].@[attribute]=attributeValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package org.openapitools.event {
|
|
||||||
import org.openapitools.event.Response;
|
|
||||||
|
|
||||||
import flash.events.Event;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event dispatched by the SDK to communicate success events and failure events.
|
|
||||||
* If a custom dispatcher has been assigned by the consumer on the generated client then the dispatcher dispatches
|
|
||||||
* the ApiClientEvent to indicate success or failure of the invocation using the Response
|
|
||||||
*/
|
|
||||||
public class ApiClientEvent extends Event{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event type to indicate a unsuccessful invocation
|
|
||||||
*/
|
|
||||||
public static const FAILURE_EVENT:String = "unsuccesfulInvocation";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event type to indicate a successful invocation
|
|
||||||
*/
|
|
||||||
public static const SUCCESS_EVENT:String = "successfulInvocation";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Response object which contains response info
|
|
||||||
*/
|
|
||||||
public var response: Response;
|
|
||||||
/**
|
|
||||||
* Any additional info
|
|
||||||
*/
|
|
||||||
public var message:String;
|
|
||||||
|
|
||||||
public function ApiClientEvent(type:String,bubbles:Boolean = false,cancelable:Boolean = false) {
|
|
||||||
super(type, bubbles, cancelable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package org.openapitools.event {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Response contains info on the result of an API invocation.
|
|
||||||
* A completion listener will expect this Response object.
|
|
||||||
*/
|
|
||||||
public class Response {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates whether the invoked operation failed or succeeded
|
|
||||||
*/
|
|
||||||
public var isSuccess:Boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The payload of the successful operation eg. a Word in a WordRequest
|
|
||||||
*/
|
|
||||||
public var payload:Object;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error message in case of failure
|
|
||||||
*/
|
|
||||||
public var errorMessage:String;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A request Id that was passed in by the user as a param when invoking the operation
|
|
||||||
*/
|
|
||||||
public var requestId:String;
|
|
||||||
private static const API_ERROR_MSG:String = "Api error response: ";
|
|
||||||
|
|
||||||
public function Response(isSuccessful: Boolean, payload: Object = null, errorMessage: String = null, requestId: String = null) {
|
|
||||||
this.isSuccess = isSuccessful;
|
|
||||||
this.payload = payload;
|
|
||||||
this.errorMessage = getFriendlyMessage(errorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function getFriendlyMessage(errorMessage: String): String{
|
|
||||||
var result: String = errorMessage;
|
|
||||||
if(errorMessage == null)
|
|
||||||
return null;
|
|
||||||
var errorCode: String;
|
|
||||||
var errorCodeArray: Array = errorMessage.match(/(?<=HTTP\/1.1 )[0-9][0-9][0-9]/);
|
|
||||||
if(errorCodeArray != null && errorCodeArray.length == 1){
|
|
||||||
errorCode = String(errorCodeArray[0]);
|
|
||||||
}
|
|
||||||
var msgArray: Array = errorMessage.match(/(?<=HTTP\/1.1 [0-9][0-9][0-9] )[^]*/);
|
|
||||||
if(msgArray != null && msgArray.length == 1){
|
|
||||||
result = API_ERROR_MSG + String(msgArray[0]);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function toString(): String {
|
|
||||||
return "Response (requestId:" + requestId + "; isSuccess:" + isSuccess + "; errorMessage:" + errorMessage + "; payload:" + payload + ")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
package org.openapitools.exception
|
|
||||||
{
|
|
||||||
public class ApiError extends Error
|
|
||||||
{
|
|
||||||
public function ApiError(id:*=0, message:*="")
|
|
||||||
{
|
|
||||||
super(message,id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
package org.openapitools.exception
|
|
||||||
{
|
|
||||||
public class ApiErrorCodes
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* System exception.
|
|
||||||
*/
|
|
||||||
public static const SYSTEM_EXCEPTION: Number = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* With Arguments as current key.
|
|
||||||
*/
|
|
||||||
public static const API_KEY_NOT_VALID: Number = 1000;
|
|
||||||
/**
|
|
||||||
* With arguments as current token value
|
|
||||||
*/
|
|
||||||
public static const AUTH_TOKEN_NOT_VALID: Number = 1001;
|
|
||||||
/**
|
|
||||||
* With arguments as input JSON and output class anme
|
|
||||||
*/
|
|
||||||
public static const ERROR_CONVERTING_JSON_TO_JAVA: Number = 1002;
|
|
||||||
/**
|
|
||||||
* With arguments as JAVA class name
|
|
||||||
*/
|
|
||||||
public static const ERROR_CONVERTING_JAVA_TO_JSON: Number = 1003;
|
|
||||||
|
|
||||||
public static const ERROR_FROM_WEBSERVICE_CALL: Number = 1004;
|
|
||||||
/**
|
|
||||||
* With arguments as current API server name
|
|
||||||
*/
|
|
||||||
public static const API_SERVER_NOT_VALID: Number = 1005;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
||||||
#
|
|
||||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
|
||||||
|
|
||||||
git_user_id=$1
|
|
||||||
git_repo_id=$2
|
|
||||||
release_note=$3
|
|
||||||
|
|
||||||
if [ "$git_user_id" = "" ]; then
|
|
||||||
git_user_id="GIT_USER_ID"
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$git_repo_id" = "" ]; then
|
|
||||||
git_repo_id="GIT_REPO_ID"
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$release_note" = "" ]; then
|
|
||||||
release_note="Minor update"
|
|
||||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Initialize the local directory as a Git repository
|
|
||||||
git init
|
|
||||||
|
|
||||||
# Adds the files in the local repository and stages them for commit.
|
|
||||||
git add .
|
|
||||||
|
|
||||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
||||||
git commit -m "$release_note"
|
|
||||||
|
|
||||||
# Sets the new remote
|
|
||||||
git_remote=`git remote`
|
|
||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
||||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
||||||
else
|
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
git pull origin master
|
|
||||||
|
|
||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
||||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
||||||
git push origin master 2>&1 | grep -v 'To https'
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user