* Ada generator generates "=>" (correct syntax) instead of "->". Fixes#7450
* Updated the Ada petstore samples
* Committing "VERSION" file and the rest of the petstore samples
* [csharp] Support composition on toJson
Previous implementation assumed specification only supports polymorphic
associations (via discrimator), although the code didn't seem to be
setup correctly for that in the first place. That is, the parent object
must define the discriminator (see
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support),
so NOT HAS parent AND HAS discriminator doesn't make sense.
From a C# perspective, base classes should have the method marked
virtual and derived classes should override the method. This supports
both composition and polymorphic definitions.
* [csharp] this.Configuration in api template
Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.
* [csharp] Models/properties support nested arrays
Previous implementation didn't support multiple levels of array with
array items as OpenAPI spec supports. This means an object defined as
type: array with items = type: array|items=double (which is common in
GIS) would not be possible.
This implementation assumes generics in the nested type definitions, so
the above would generate List<List<double?>> for model parent types as
well as property type declarations.
* [csharp] Regenerate integration test sample
* [csharp] Set "Client" case sensitive as reserved
* [csharp] Regenerate security sample
* [csharp] Regenerate samples
* [csharp] Support composition on toJson
Previous implementation assumed specification only supports polymorphic
associations (via discrimator), although the code didn't seem to be
setup correctly for that in the first place. That is, the parent object
must define the discriminator (see
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support),
so NOT HAS parent AND HAS discriminator doesn't make sense.
From a C# perspective, base classes should have the method marked
virtual and derived classes should override the method. This supports
both composition and polymorphic definitions.
* [csharp] Regenerate integration test files
* [csharp] Regenerate samples
* [csharp] Regenerate security sample
* [csharp] this.Configuration in api template
Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.
* [csharp] Regenerate samples
* Fix the comparison between two model types to compare them recursively
and make sure we sort the model types according to their dependencies
* Run bin/ada-petstore.sh to update the generated Ada client samples
* Fix Ada client generated code to avoid having a spurious body name for parameters passed in the body
* Run bin/ada-petstore.sh to update the generated Ada client samples
* [erlang-client] fix body param from being included path and base path to remove host
* [erlang-client] move request logic out of api functions to utils module
* [erlang-client] add support for passing http client configuration to requests
* [erlang-client] update auth handling
* [erlang-client] remove underscore2, replacing with original underscore + replaceAll
* [Rust] Consider error statuscodes to be errors
* [Rust] Introduce 'ApiError' type for 4xx/5xx resp
This updates the previous commit which added an 'ErrorStatus' variant to
an 'ApiError' variant.
It does not specialize the error to the specific possible error
responses yet, rather returning a 'serde_json::Value' for any case.
This will lose any error messages which cannot be parsed as json and
instead return a json-parse error.
A future change should update the generated signatures such that the
returned future's error type is specialized to the specific errors that
may be returned by that api (and possibly a catchall json::Value still).
* [Rust] Regenerate petstore samples
* [Rust] Add error example to petstore sample
* [Java] #3024 - Add build-helper-maven-plugin version to retrofit client template
* [Java] #3024 - Add build-helper-maven-plugin version to feign client template
* [Java] #3024 - Add build-helper-maven-plugin version to jersey client template
* [Java] #3024 - Add build-helper-maven-plugin version to resteasy client template
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none
* Updates after review
Also common http files are splitted
Update Petstore examples
* Small Fixes for cleaning up arrays of arrays/maps
* Changes
- Api Body pass by Reference, avoid seg fault due to deletion of auto constructed object passed as parameter.
- Support Maps and Arrays upto a depth of 2
- Refactor Helpers to handle Maps and simplify code
* Remove size check due to possible incorrect type
* Update PetStore Examples for Qt5 C++ and small fixes for QDate/QDateTime
* Updates after review. Fixes typo and remove usage of auto keyword.
* Restored usage of auto keyword.
* Regenerate test/UserApiTest.php
The same implementation as testLoginUser() is in tests/UserApiTest.php
* Delete test/Client/ObjectSerializerTest.php
The same implementation is in tests/ObjectSerializerTest.php
* Update Petstore sample
- bin/php-petstore.sh
- bin/security/php-petstore.sh
* [scala] Escape reserved words, support Array[Byte]
Previously, Array[Byte] was compiling to ArrayByte. This provides a type
mapping to output the correct type.
This also escapes reserved words with grave accents, as is most common
in Scala. Escaping with an underscore prefix breaks serialization (in
Jackson, for example) unless templates are modified manually. Escaping
using grave accent should unblock most serializers from requiring
template modifications.
* [scala] Regenerate integration test outputs
* [scala] Regenerate samples
* [scala] Remove unused imports in related codegen files
* [scala] Fix default values in scala client
This uses consistent logic for optional types with default values in the
scala client. Also, uses Option(default) instead of Some(default) to
guard against people defining defaultValue = null. Option(null) becomes
None while Some(null) defines a null value explicitly and will break
maplike operations.
* [scala] Regenerate client sample
* [scala] Add missing json4s import, which will be added by another PR but allows current samples to generate
* [scala] Include integration tests for required attributes support
* [scala] Support string types with formats
This adds support for better support of type=string and
format={date,date-time,binary,byte}. Previously, binary and byte were
inconsistently defined as strings rather than byte arrays, while
date/date-time were parsing default values into formats that did not
match OpenAPI/Swagger 2.0 specifications for full-date and date-time.
We may want to consider pulling in json4s-ext to support wider date
formats and moving to date=LocalDate and date-time=ZonedDateTime.
This will have breaking changes for consumers expecting binary/byte to
be strings rather than byte arrays.
* [scala] Unique parameter names in integration test, to avoid seemingly conflicting names
* [scala] Regenerate client sample
* Sort file listings in AssertFile.java
Per File#list() javadocs:
There is no guarantee that the name strings in the resulting array
will appear in any specific order; they are not, in particular,
guaranteed to appear in alphabetical order.
I'm unable to repro directory listing failures on OS X High Sierra or
Ubuntu 16.04 under Parallels, so it's not clear to me if listing order
is indeterminate per-platform or the behavior is just not defined and
up to the platform's installed runtime. Sorting the array of strings
prior to comparison should resolve this issue on every platform/runtime.
* [scala] exclude api tests for integration test gen script
Script should match options in the integration test class
* [scala] Temporarily disable client integration tests
CI doesn't seem to pick up template changes in integration tests.
Disabling scala client integration tests, pending investigation of the
issue.
* [scala] Remove redundant json4s import
* [scala] Regenerate integration test
* [scala] Regenerate sample
* Add Ada client petstore samples
- Add script to generate Ada client support with swagger-codegen
- Add files to build the Ada sample
- Add main program to use the generated client samples API
and connect to the server to perform some operations
* Add some description for the samples
* Update the documentation to explain how to build, how to use the generated Ada client code
* Add server support for path parameters
- Update postProcessOperations to scan each path parameter and emit a x-path-index
vendor attribute to tell the index of the path parameter
* Add and fix Ada server code package declaration
- fix declaration of operations
- generate a generic package that must be instantiated with the target server implementation
and which provides the skeleton (deserialization and serialization of data)
* Implement the Ada server side operations
- extract body, query parameters, path parameters
- serialize the result
- register operations to the server according to the path/routes
* Update the code generation to generate server Ada implementation code
* Improvement of Ada server support: generate the swagger.json template file
* Define toModelName operation to the creation of a model identifier
* Add support for server permission generation
- collect the security scopes in postProcessAuthMethod() method and make sure
these scopes have unique identifiers. Some scopes correspond to URLs
but others correspond to pseudo identifiers.
* Use the #lambdaAdaComment filter to indent correctly a multi-line description
* Fix model generation to support arrays
* Update the generated GNAT project file
* Refactoring and improvement of server code generation
- Change the server generated code to pass a Context_Type object
to allow the server implementation to get/set headers in the request/response
and control what is put in some responses
- Generate the security permissions based on the scopes that have been collected
* Server code generation improvement
- Fix generation of GNAT project
- Generate the intermediate Ada packages if necessary
- Generate the server main
* Ada server main template
* Ada server code improvement
- Add support to generate server permission verification
- Fix the GNAT project definition
- Templates for Ada intermediate packages
* Skeleton for the server side implementation
* Generate an empty Ada server implementation
* Templates for the Ada server implementation
* Add a README.md file and a GNAT config.gpr file
* New templates to document the generated Ada server
* Add server configuration file for the Ada server
* Fix the log message in the Ada server to report the correct URI to connect to
* Generate the Ada server configuration file
* Improvement of Ada code model to support nullable types
* Update the Ada server templates
* Refactor the Ada code generator
- separate the Ada client and Ada server code generators
- register the Ada server code generator under the name 'ada-server'
keep 'ada' for the client Ada code generator
- moved the common Ada code operation supports to the AbstractAdaCodegen
* Improvement and cleanup of Ada client and server code
- new template for the client main program
- fix the GNAT project template for client or server programs
- remove unused options to better use the --model-package option
* Fix the GNAT project file name to use a lower case name
Fix the default GNAT config
Fix the headers of intermediate Ada package files
* Regenerate the model and client Ada files
* Update the Ada client sample to take into account the Nullable types
* Regenerate some files with Ada Swagger Codegen
* Ignore generation of petstore.gpr
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none
* Updates after review
Also common http files are splitted
Update Petstore examples
* Initial commit, Generates everything necessary to run a performnace test against a swagger api. Just have to fill out the CSV feeder files with your data.
* adding samples and gatling-petstore.sh file
* Extending the AbstractScalaCodeGen
* Checking in the CodegenConfig file as it is needed to generate
* removing escaped reserved words
* Changed model to be able to make all variables utilize an underscore while json fields are still just the variable name
* Changing underscore to var as interpolation can not start with a _ in scala
* Fixing path params
* allow you to pass in a system property to define which config to use as a workload profile, use rate and instance multipliers to scale up and down your test, added ramp down after the test is completed, added global assertions.
* Addressing PR feedback
* missed semi-colon
* Bringing everything up to date with the renames that were suggested
* [haskell-http-client] handle */* mimetype correctly
* [haskell-http-client] generate separate api modules, for each child api
* [haskell-http-client] add cliOption "allowNonUniqueOperationIds"
When cli option "allowNonUniqueOperationIds" is true,
allows *different* API modules to contain the same operationId,
and then each API must be imported qualified.
* Fix some go client formatting issues
* Fix go client go imports
* Run `goimports -w .` on examples directory
* Sort imports in api
* Add new line between each property
Before secret feature was used to add new line using two property
declaration in the same line. There should be no new line before
first property. The easiest way is to use `-first` special
property
https://github.com/samskivert/jmustache#-first-and--last
New line are required so `goimports` won't reformat whitespaces between
property name and type.
* Change whitespaces to tabs
* Fix whitespaces in api_client
There is a new line between each service to prevent `goimports` from
adding whitespaces between types and names
* Fix more whitespaces
There was a need to set special delimeter for formatting in the commit.
Go slices use curly braces and `jmustache` got confused when found
triple curly braces.
* Fix whitespaces in configuration.mustache
* Fix whitespaces for api response
* Support for optional description
Do not add whitespace if description is missing
* Add new lines between enum values to prevent formatting
* Generate go code from current code
- imports are not sorted :(
- there are extra whitespaces for different languages. I don't know why
* Run generate for security tests