You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When processing a YML file with a parameters that has two properties that refs to the same "definition (see YML file), the adb file for the model has got a wrong "Deserialize" method, which cannot be compiled. For example, with the YML below, it has a line saying:
Swagger.Streams.Deserialize (Object, "commands", Value.Commands);
that should be a:
Deserialize (Object, "commands", Value.Commands);
Swagger-codegen version
2.4.0-SNAPSHOT from the github
Swagger declaration file content or url
swagger: '2.0'# edited with http://editor.swagger.io/info:
version: 1.0.0title: AH Orchestratordescription: Service Interface for Arrowhead Orchestratorcontact:
name: Michele Albanoemail: mialb@isep.ipp.pturl: http://www.cister.isep.ipp.pt/people/michele_albano/license:
name: MITurl: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIThost: 127.0.0.1:8442basePath: "/orchestrator"schemes:
- httpconsumes:
- application/jsonproduces:
- application/jsonpaths:
/orchestration:
post:
description: Query an orchestrated service instanceoperationId: orchStoreparameters:
- name: serviceRequestFormin: bodydescription: Requests an orchestrated service instancerequired: trueschema:
type: objectproperties:
requestedQoS:
$ref: '#/definitions/stringsMap'commands:
$ref: '#/definitions/stringsMap'responses:
200:
description: Response to a service orchestration requestdefault:
description: Unexpected errordefinitions:
stringsMap:
type: "object"properties:
key:
type: string
Change how the model body (adb) is generated. In the example at hand, you generate a correct code for the "requestedQoS" property, but a wrong one for the "commands" property. Thus, instead of:
… the YML file (#7655)
* Ada generator generates "=>" (correct syntax) instead of "->". Fixes#7450
* Updated the Ada petstore samples
* Committing "VERSION" file and the rest of the petstore samples
* Changed default project name and package name for Ada, not to have circular dependencies between gpr files.
* Ada code generator now adds x-is-model-type every time a model is defined locally in the YML file.
Fix#7569.
Description
When processing a YML file with a parameters that has two properties that refs to the same "definition (see YML file), the adb file for the model has got a wrong "Deserialize" method, which cannot be compiled. For example, with the YML below, it has a line saying:
Swagger.Streams.Deserialize (Object, "commands", Value.Commands);
that should be a:
Deserialize (Object, "commands", Value.Commands);
Swagger-codegen version
2.4.0-SNAPSHOT from the github
Swagger declaration file content or url
Command line used for generation
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ../openapiAHproblem.yml -l ada -o ../ada-ah7/ --api-package AH.problem --model-package AH.problem
Steps to reproduce
Related issues/PRs
N/A
Suggest a fix/enhancement
Change how the model body (adb) is generated. In the example at hand, you generate a correct code for the "requestedQoS" property, but a wrong one for the "commands" property. Thus, instead of:
please generate a:
Deserialize (Object, "requestedQoS", Value.Requested_Qo_S);
Deserialize (Object, "commands", Value.Commands);
The text was updated successfully, but these errors were encountered: