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

When do you support return value types #26

Closed
AI-pig opened this issue Jul 1, 2019 · 4 comments
Closed

When do you support return value types #26

AI-pig opened this issue Jul 1, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@AI-pig
Copy link

AI-pig commented Jul 1, 2019

No description provided.

@AI-pig AI-pig changed the title when you support type of return. When do you support return value types Jul 1, 2019
@Manweill
Copy link
Owner

Manweill commented Jul 2, 2019

what is the problem

@perminov-aleksandr
Copy link

Hello, im not a author of issue, but i struggle with the same problem.
Generated class does not contain types for result when it is specified.
For example, i have a path in specification file that returns array of AppRole type:

"paths": {
    "/api/Roles/Get": {
      "get": {
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "uniqueItems": false,
              "type": "array",
              "items": {
                "$ref": "#/definitions/AppRole"
              }
            }
          }
        }
      }
    }
},
"definitions": {
    "AppRole": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
}

but result is generated service method without type, just Promise of any

export class RolesService {
static get(options: IRequestOptions = {}): Promise<any> {
    return new Promise((resolve, reject) => {
    //...
  }
}

@Manweill
Copy link
Owner

Manweill commented Aug 5, 2019

@perminov-aleksandr
ok, I see;

@Manweill Manweill added the bug Something isn't working label Aug 5, 2019
@Manweill
Copy link
Owner

Manweill commented Aug 5, 2019

@perminov-aleksandr @AI-pig fix in v0.5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants