* Updated api client, Required parameters {{#required}} .. {{/required}}, are mapped to Eiffel
Void Safety Rules, optional parameters are translated to detachable TYPE.
Validation Rules are mapped to preconditions, at the moment maximun and minimun
validation has been added.
Improved API_CLIENT.parameter_to_tuple feature to accept a LIST [ANY] instead of LIST [STRING_32].
Improved model template to generate the model output.
* Updated API_CLIENT.parameter_to_string feature, missing STRING representation.
* Updating sample using the latest modifications.
Fixes#5985
We were experiencing syntax issues when generating the Petstore example. See some of the examples below:
StoreApiInterface.php
namespace Swagger\Server\Api;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Swagger\Server\Model\Order;
**use maparray<string,int>;**
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
UserApiInterface.php
public function createUsersWithArrayInput(**User[]** $body);
public function createUsersWithListInput(User[] $body);
As far as I know, it is not possible to use array of objects in this way.
PetApiInterface.php
namespace Swagger\Server\Api;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Swagger\Server\Model\Pet;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Swagger\Server\Model\ApiResponse;
**use string[];**
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
public function findPetsByStatus(string[] $status);
public function findPetsByTags(string[] $tags);
* Add addiitional files from upstream
* Remove mis-added files
* Add additional swift4 initializer for initializing model object with properties.
This change fixes this issue: https://github.com/swagger-api/swagger-codegen/issues/6641
It adds an additional initializer which allows model objects to be initialized using the properties. For exxample, if we had this model:
"ErrorInfo": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Example Error object"
},
This we generate an initializer for this model object like this:
public init(code: Int?, message: String?, details: [String]?) {
self.code = code
self.message = message
self.details = details
}
* Add hasVars checks around initializers and re-run all scripts to re-generate
Void Safety Rules, optional parameters are translated to detachable TYPE.
Validation Rules are mapped to preconditions, at the moment maximun and minimun
validation has been added.
Improved API_CLIENT.parameter_to_tuple feature to accept a LIST [ANY] instead of LIST [STRING_32].
Improved model template to generate the model output.
* Add addiitional files from upstream
* Remove mis-added files
* Fix compilation issue with Swift4 inline enums.
This change fixes this issue: https://github.com/swagger-api/swagger-codegen/issues/6607
The problem was that I was using "datatype" instead of "datatypeWithEnum" in the model.mustache file.
When you have a the following model property:
"myInlineStringEnum": {
"type": "string",
"enum": [
"inlineStringEnumValue1",
"inlineStringEnumValue2",
"inlineStringEnumValue3"
]
}
Then we were generating:
public enum MyInlineStringEnum: String, Codable {
case inlinestringenumvalue1 = "inlineStringEnumValue1"
case inlinestringenumvalue2 = "inlineStringEnumValue2"
case inlinestringenumvalue3 = "inlineStringEnumValue3"
}
However, when we decode this, we were using type of the enum ("datatype") rather than the enum type itself ("datatypeWithEnum"). So we were generating:
myInlineStringEnum = try container.decodeIfPresent(String.self, forKey: "myInlineStringEnum")
rather than:
myInlineStringEnum = try container.decodeIfPresent(MyInlineStringEnum.self, forKey: "myInlineStringEnum")
* Adds the ability to create code for an interface-based jaxrs client.
* Adds shell script and sample files for jaxrs-spec-interface
* rebase into adds shell
* Fixes bug in creation of Produces/Consumes in method annotation. Allows for instance "application/json; charset=utf-8"
* Fixes generated pom.xml
* Generate pom.xml by default
* Prettier output from api.mustache
* Fixes bug in mediatype, allowing charset-specification in swagger.yaml.
* Merges generation of interface-based jaxrs client/api into jaxrs-spec.
* Moves jaxrs-spec server interface to match location of jaxrs-spec server
* Makes Generated-annotation in genereated classes slightly prettier.
* 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
* represent swagger enums as union of literal types
enabling their easy use in angular templates, structural subtyping
among enums (in particular, different instances of the same enum
are now mutually assignable), improving type safety by preventing
incorrect widening, and permitting numeric enum values
(albeit without descriptive names)
Fixes#6206, #5146, #3500
* update samples
* restore blank lines at end of file
* fix typo
* Add support for lists of path parameters (eg instances), and default params for optional case classes
* Update Petstore sample
* Revert defaulting of case class fields to None
* Update Petstore sample
* add support for auth methods
* use newtypes for required params
* fix duplicate operationId issues
* prevent aliasing of vendorextension references in fromOperation
* add --fast to stack ci build
* [objc] Update deployment target to 8.0
Updates the test project deployment target to 8.0, as that's the lowest
supported by the latest XCode.
* [objc] Update petstore tests based on current master
Makes sure the tests are based on the latest version of master.
* [objc] Allow specifying the serialization timezone
Now it's possible to specify the timezone used for serializing dates
* Add test which reproduce the warning #5338https://github.com/swagger-api/swagger-codegen/issues/5338#issuecomment-292502895
`[main] WARN io.swagger.codegen.languages.PhpClientCodegen - Type object not handled properly in setParameterExampleValue`
* Fix Type object not handled properly in setParameterExampleValue
* Update samples
- /bin/php-petstore.sh
- /bin/security/php-petstore.sh
* Added namespace mustache to be generated
* Fixed syntax issues with package generation
* Added Response and Element mustache templates
* Added ApiClient
* Fix: Only required parameters needed for api operations
* Added documentation generated code
* Regenerated petstore samples
* Fixed url paths for operations
* Fixed based on comments in issues #6520
* Regenerated petstore samples