Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpprest] references to array definitions are not generated - compilation failed #7053

Closed
etherealjoy opened this issue Nov 24, 2017 · 1 comment

Comments

@etherealjoy
Copy link
Contributor

etherealjoy commented Nov 24, 2017

Description

Direct references to definitions which are array are not correctly generated. The class inheritance is incomplete leading to compilation error.

For example below is the code for cpprest for the yaml below

class  GenericResources
    : public null<GenericResources_inner>
{
public:
Swagger-codegen version

2.2.3
2.3.0
3.0.0

Swagger declaration file content or url
    properties:
      MemoryBytes:
        type: "integer"
        format: "int64"
        example: 8272408576
      GenericResources:
        $ref: "#/definitions/GenericResources"

  GenericResources:
    description: "User-defined resources can be either Integer resources"
    type: "array"
    items:

has to be changed to

    properties:
      MemoryBytes:
        type: "integer"
        format: "int64"
        example: 8272408576
      GenericResources:
        type: "array"
        items: 
          $ref: "#/definitions/GenericResources"

  GenericResources:
    description: "User-defined resources can be either Integer resources "
    type: "object"
Command line used for generation

java -jar /home/dev/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -o /home/cpprest/gen -i /home/yaml/docker-v132-subset.yaml -l cpprest

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
@etherealjoy etherealjoy changed the title [cpprest][qt5cpp] references to array definitions are not generated - compilation failed [cpprest] references to array definitions are not generated - compilation failed Jan 4, 2018
@etherealjoy
Copy link
Contributor Author

Solved in #7571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant