-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Model interface not generated in version 2.0 typescript-angular for nested properties #304
Comments
@wing328 |
@topce the problem can be fixed by changing the api definition as follows: swagger: '2.0'
info:
title: Test
description: Test
version: "1.0.0"
host: "localhost:8002"
schemes:
- http
basePath: /v1
produces:
- application/json
securityDefinitions:
basicAuth:
type: basic
description: HTTP Basic Authentication
security:
- basicAuth: []
paths:
definitions:
NotificationDefinition:
type: object
description: the representation of all the notification configuration of one node
properties:
profiles:
type: array
items:
$ref: "#/definitions/ProfileWrapper"
users:
type: array
items:
$ref: "#/definitions/UserWrapper"
User:
type: object
description: a CIRCABC user
properties:
userId:
type: string
firstname:
type: string
lastname:
type: string
email:
type: string
phone:
type: string
uiLang:
type: string
contentFilterLang:
type: string
visibility:
type: boolean
properties:
$ref: '#/definitions/Properties'
avatar:
type: string
description: |
Used to get the URL of the user picture that will be shown everywhere in the app
Profile:
type: object
description: the representation of an access profile definition inside an Interest Group
properties:
id:
type: string
name:
type: string
title:
$ref: string
groupName:
type: string
permissions:
$ref: '#/definitions/Permissions'
imported:
type: boolean
importedRef:
type: string
description: |
in the case the profile is imported from another group, it is the IG nodeRef from which
it has been imported
exported:
type: boolean
exportedRefs:
type: array
items:
type: string
description: |
in the case the profile is exported and imported at least once in an IG, it is the list of
all the IGs in which the profile has been imported into
ProfileWrapper:
type: object
properties:
profile:
$ref: "#/definitions/Profile"
notifications:
type: string
inherited:
type: boolean
UserWrapper:
type: object
properties:
user:
$ref: "#/definitions/User"
notifications:
type: string
inherited:
type: boolean
Properties:
type: object
description: |
properties field will receive all the configuration parameters relative
to the user accound. For example notification / prefered language / etc.
Permissions:
type: object
additionalProperties:
type: string I successfully tested the above spec with @jmini I think this issue should be closed as a duplicate of #8 |
Thank you @macjohnny for fast comment and workaround. @jmini and @wing328 do you think we should fix this |
Thank you @macjohnny ! |
Description
Model interface not generated in version 2.0 typescript-angular for nested properties
openapi-generator version
3.0.1 master
it is regression if we compare with swagger-codegen master
OpenAPI declaration file content or url
it generates
before it generated 3 files
Command line used for generation
org.openapitools.codegen.OpenAPIGenerator
generate -i C:\swagger.yaml -g typescript-angular -o C:\temp --additional-properties ngVersion=6.0.0
Steps to reproduce
run generator with provided yaml file typescript-angular
Related issues/PRs
probably same issue is presented with some other generators
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: