You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generating client without 'withSeparateModelsAndApi' flag on, the generated client works with no problem. But when I set the withSeparateModelsAndApi to true and set the apiPackage and the modelPackage, application some how breaks. All I get is the error: 'SyntaxError: ambiguous indirect export: Address'.
This is how I use the API:
`
import { onMounted } from 'vue';
import { PetApi } from '@/api-axios/api/pet-api';
import { PetStatus } from '@/api-axios/models/';
We also have problems with typescript-axios since 7.0.0 and withSeparateModelsAndApi=true. The previous version 6.6.0 was fine for us.
We have problems with generated models and allOf+discriminator types. With version 6.6.0 a MoreSpecialTypeAllOf.ts file was generated and exported as export GenericTyp & MoreSpecialTypeAllOf. Seems that inheritance is completly broken.
We also have problems with typescript-axios since 7.0.0 and withSeparateModelsAndApi=true. The previous version 6.6.0 was fine for us.
We have problems with generated models and allOf+discriminator types. With version 6.6.0 a MoreSpecialTypeAllOf.ts file was generated and exported as export GenericTyp & MoreSpecialTypeAllOf. Seems that inheritance is completly broken.
Bug Report Checklist
Description
When generating client without 'withSeparateModelsAndApi' flag on, the generated client works with no problem. But when I set the withSeparateModelsAndApi to true and set the apiPackage and the modelPackage, application some how breaks. All I get is the error: 'SyntaxError: ambiguous indirect export: Address'.
This is how I use the API:
`
import { onMounted } from 'vue';
import { PetApi } from '@/api-axios/api/pet-api';
import { PetStatus } from '@/api-axios/models/';
const api = new PetApi();
const fetchPet = async () => {
try{
const response = await api.findPetsByStatus(PetStatus.Available);
console.log(response);
}
catch{
}
}
onMounted(() => {
fetchPet();
})
`
openapi-generator version
7.0.0
OpenAPI declaration file content or url
SwaggerPetstore.json
Generation Details
java -jar "@openapitools/openapi-generator-cli/versions/7.0.0.jar" generate --input-spec="./pets.json" --generator-name="typescript-axios" --output="src/api-axios" --additional-properties="enumNameSuffix=,withSeparateModelsAndApi=true,apiPackage=api,modelPackage=models"
The text was updated successfully, but these errors were encountered: