* [tools] Make sed in new.sh more cross-platform
The -r option passed to sed is a GNU sed option for extended regex
evaluation. The -E option evaluates the same option, and is part of the
POSIX standard, meaning this option is available in GNU sed as well as
Apple's BSD variant.
This commit removes the need for users to install gnu-sed on Mac.
* [ktor] Initial ktor (kotlin-server)
This adds a very barebones implementation for a ktor server generator.
This supports metrics and typed locations. All endpoins are stubbed to
return HTTP/1.1 501 Not Implemented.
* [ktor] Initial sample
* [ktor] Adding options for select feature installs
Options available:
* featureAutoHead
* featureConditionalHeaders
* featureHSTS
* featureCORS
* featureCompression
* [ktor] Start of auth functionality
* [ktor] API key auth placeholder
* Add basic support for oauth2 configurations
ktor doesn't seem to explicitly accept oauth flow properties in its
configuration object. This may be a blocker for 'implicit' flow
definitions.
* Added example response objects
* [ktor] Route for apis with bodies, some cleanup
ktor locations are only supported for routes with path/query parameters.
Routes with body or file parameters must be declared with traditional
route api.
This commit also includes lambdas for simplifying processing in
library-based server generator code. As an example, ktor requires
lowercase http methods while spring (a potential future generator)
would require an uppercase such as HttpMethod.GET. It doesn't make sense
to modify these in the operations post-process method because that
format wouldn't be universally desirable.
The lambdas included in the KotlinServerCodegen:
* lowercase: converts all text to lowercase
* uppercase: converts all text to UPPERCASE
* titlecase: converts words (with configurable delim) to Title Case
* indented|indented_8|indented_12|indented_16: these helpers apply the
same desired indent to all lines of an included fragment's text.
* Fix some javadoc issues in lambda classes
* Update kotlin-server-petstore.bat
Change `kotlin` to `kotlin-server`
* Fix javadoc error messages in CI
* add luarocks spec
* remove trailing spaces
* remove rockspec filename option
* update lua rockspec
* update rockspec based on feedback
* remove configuration which is not needed
* remove api_client, which is no longer needed
* Build sample prior to code changes so differences are easier to decipher
* Add byte array type adapter for okhttp-gson (java8 only)
* Unit revealed that Gson (or GsonFire) defaults to escape = (equal sign) out of base64 string. Add disableHtmlEscaping() to gsonbuilder.
* Update specs and samples to include format=byte and include junit test of byte array serialization and deserialization.
* Implement recommendations by @cbornet including: Use okio.ByteString for base64 conversions instead of java 8 lib since the okhttp-gson client already includes okio. Remove setting to disableHtmlEscaping. Rename LocalByteArrayAdapter to ByteArrayAdapter.
* Update spec and sample for java okhttp-gson library client
* Undo addition of profilePhoto property. A format byte property is already available under the format_test definition.
* Put previously deleted tests back. Modified testFindPetsByTags() to verify exception since the server now returns a 500 for this request.
* Update test to pass when run against docker containerized server swaggerapi/petstore (heads up, this test fails if calling out to the internet published version of http://petstore.swagger.io)
* Split up model template into partials
* Change models from class to struct.
This fixes issue https://github.com/swagger-api/swagger-codegen/issues/6941.
In this change, we make our Swift4 generated model objects struct instead of class. However, in order to do this, we needed to handle the following edge cases:
* Inheritance and polymorphism (allOf)
* With classes, we use inheritance. So therefore, the parent properties are ONLY on the parent generated class, and the model object which derives from the parent class picks up those properties through inheritance.
* However, structs do not support inheritance. So we simply duplicate the parent allOf properties in the child struct.
* We have to handle the case where the property name on the struct may be different than the property name in the JSON. By default, the Codable protocol assumes that the JSON property name is the same as the struct property name. If they need to be different, then we generate a CodingKeys string enum, which contains the mapping between struct property name and JSON property name.
* additionalProperties. We cannot use the default Codable implementation for the additionalProperties, since it will look for an actual dictionary called "additionalProperties" in the JSON. Therefore, for model objects which have additionalProperties, we must generate our own implementation for the Decodable and Encodable protocols.
I have run ./bin/swift4-all.sh and ./bin/swift4-test.sh to re-generate all of the sources, and I have verified that the generated code in samples/clients/test/swift4/default builds and the unit tests pass.
* Update VERSION in .swagger-codegen
* Update generated code for swift4-test schema
* #7365: use enums string / number literals for request parameter if it is an enum
* #7365: use enums string / number literals for request parameter if it is an enum
* #7365: use enums string / number literals for request parameter if it is an enum
* #7365: improve docs
* #7365: move code to AbstractTypeScriptClientCodegen, remove redundant code in TypeScriptAngularClientCodegen, change type Object to Number in numericEnumValuesToEnumTypeUnion()
* #7365: move code to AbstractTypeScriptClientCodegen, remove redundant code in TypeScriptAngularClientCodegen, change type Object to Number in numericEnumValuesToEnumTypeUnion()
* #7365: allow parameter data type customizations
* #7365: re-enable disabled unit test assertions
* #7365: remove enum handling from type declaration generation
* #7365: generate all typescript samples
* #7365: re-enable disabled unit test assertion
* copy mustache templates from dart generator
* Start with generator by copying the DartClientCodegen for now
* at least we know this is not for a browser..
* First working version for a simple swagger configuration
* remove browserClient parameter, since it doesn't make sense for flutter
* Take care of complex types to support object hierarchies
* add null safety
* add small test for options
* add flutter-petstore scripts
* generate flutter petstore output
* Add new flutter test project
* move generated client to make it usable
* use generated swagger petstore plugin
* add support for lists of objects
* add DateTime support
* fix listFromJson implementation
* fix NPEs in DateTime operations + place order in sample
* Small readme changes
* bugfixes
* Use flutter-compatible implementation as default dart implementation
* fix generated samples
* Make lists serializable, now all dart test cases are working again
* better list implementation
* use StringBuffer
* removed FlutterClientCodegen
* fix browser client
* fix dependencies
* swagger-browser-client for browserClient testcases
* fix scripts
* removed flutter scripts
* add map support and simplify code via using .toJson contract
* remove unneeded devDependencies
* Regenerated samples
* fix call to mapFromJson, it is not a constructor
* remove pointless string serialization
* regenerated dart samples
* update for ze-ph generator stub to support Zend Expressive 2.1 and Path Handler 0.3
* ze-ph: for each operation generator creates special DTO model from its query parameters
* ze-ph: generation of extra TODO's for complex container type and update for samples
* 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
* Add default value and required parameter support to vertx server templates. Fix for #7409.
* Added missing serviceId declaration to workaround #allParams section clearing the vendorExtensions map