-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
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
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:
type: object
properties:
profile:
$ref: "#/definitions/Profile"
notifications:
type: string
inherited:
type: boolean
users:
type: array
items:
type: object
properties:
user:
$ref: "#/definitions/User"
notifications:
type: string
inherited:
type: boolean
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:
type: object
description: |
properties field will receive all the configuration parameters relative
to the user accound. For example notification / prefered language / etc.
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:
type: object
additionalProperties:
type: string
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 intoit generates
export interface NotificationDefinition {
profiles?: Array<any>;
users?: Array<any>;
}before it generated 3 files
/// fist
import { NotificationDefinitionProfiles } from './notificationDefinitionProfiles';
import { NotificationDefinitionUsers } from './notificationDefinitionUsers';
export interface NotificationDefinition {
profiles?: Array<NotificationDefinitionProfiles>;
users?: Array<NotificationDefinitionUsers>;
}
//// second
import { Profile } from './profile';
export interface NotificationDefinitionProfiles {
profile?: Profile;
notifications?: string;
inherited?: boolean;
}
/// third
import { User } from './user';
export interface NotificationDefinitionUsers {
user?: User;
notifications?: string;
inherited?: boolean;
}
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
Metadata
Metadata
Assignees
Labels
No labels