Closed hbunjes closed 1 year ago
Models with namespaces that have references between each other are broken since v0.50.
This is a simple openapi 3 definition with a model named "Ns.Ns2.Customer" referencing another one named "Ns.Address": openapi.json.txt
The import to Customer in the API service is modeled correctly: import { Customer as NsNs2Customer } from '../models/Ns/Ns2/customer';
import { Customer as NsNs2Customer } from '../models/Ns/Ns2/customer';
However, the import from Customer to Address is broken: import { Address as NsAddress } from '..//../models/Ns/address';
import { Address as NsAddress } from '..//../models/Ns/address';
From what I found:
My idea (in this PR):
Build error due to trailing space is fixed in https://github.com/cyclosproject/ng-openapi-gen/pull/285
Models with namespaces that have references between each other are broken since v0.50.
This is a simple openapi 3 definition with a model named "Ns.Ns2.Customer" referencing another one named "Ns.Address": openapi.json.txt
The import to Customer in the API service is modeled correctly:
import { Customer as NsNs2Customer } from '../models/Ns/Ns2/customer';
However, the import from Customer to Address is broken:
import { Address as NsAddress } from '..//../models/Ns/address';
From what I found:
My idea (in this PR):
Models with namespaces that have references between each other are broken since v0.50.
This is a simple openapi 3 definition with a model named "Ns.Ns2.Customer" referencing another one named "Ns.Address": openapi.json.txt
The import to Customer in the API service is modeled correctly:
import { Customer as NsNs2Customer } from '../models/Ns/Ns2/customer';
However, the import from Customer to Address is broken:
import { Address as NsAddress } from '..//../models/Ns/address';
From what I found:
My idea (in this PR):