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

[BUG] [typescript-anguar] allOf broken #5998

Closed
5 of 6 tasks
daniel-sc opened this issue Apr 21, 2020 · 5 comments
Closed
5 of 6 tasks

[BUG] [typescript-anguar] allOf broken #5998

daniel-sc opened this issue Apr 21, 2020 · 5 comments

Comments

@daniel-sc
Copy link
Contributor

daniel-sc commented Apr 21, 2020

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

In the latest version, generating with typescript-angular, models that use "allOf" do not contain the inherited properties any more.

openapi-generator version

This occurs with v4.3.0.
With v4.1.2 this worked fine.

OpenAPI declaration file content or url

Api spec:

openapi: 3.0.2
info:
  title: api
  version: 1.0.0
paths:
  /pet:
    get:
      summary: list all pets
      responses:
        200:
          description: pet with name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PetName'

components:
  schemas:
    Pet:
      type: object
      properties:
        id:
          type: string
          
    PetName:
      allOf:
        - $ref: '#/components/schemas/Pet'
        - type: object
          properties:
            name:
              type: string

Result:

import { PetNameAllOf } from './petNameAllOf';
import { Pet } from './pet';


export interface PetName { 
    name?: string;
}

Expected result would be along:

export interface PetName { 
    id?: string;
    name?: string;
}
Command line used for generation
java -jar openapi-generator-cli-4.3.0.jar generate -g typescript-angular -i api.yml
Steps to reproduce

Use commandline and example from above

Related issues/PRs

Maybe related:

@auto-labeler
Copy link

auto-labeler bot commented Apr 21, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@wing328
Copy link
Member

wing328 commented Apr 21, 2020

@daniel-sc can you please try the latest master? I just merged #5992 which may have fixed the issue for you.

@daniel-sc
Copy link
Contributor Author

@wing328 yes, with current master (8661ed3) it works as expected.
For when can we expect a release containing this fix?

@wing328
Copy link
Member

wing328 commented Apr 21, 2020

Roughly a week assuming no postponement.

@wing328
Copy link
Member

wing328 commented Apr 21, 2020

Thanks for confirming the latest master works for you.

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

No branches or pull requests

2 participants