-
Notifications
You must be signed in to change notification settings - Fork 127
Description
Describe the bug
When using openapi-zod-client with the --group-strategy=tag-file
option, expected model generation fails, specifically omitting WeatherForecastGetModel
in the output file.
I am working in a .NET environment, generating an OpenAPI specification from a minimal API using the default Weather Forecast sample. I have modified the API by adjusting lowercase formatting, renaming models, and adding tags. Despite these changes, the issue persists, preventing proper model generation.
Minimal reproduction
- In a .NET minimal API project, generate an OpenAPI specification from the default Weather Forecast sample.
- Modify the API by changing the casing of model names, using different model names, and adding tags.
- Run the following command:
openapi-zod-client http://localhost:[PORT]/openapi/v1.json -o ./src/api-generated --group-strategy=tag-file --export-schemas=true
- Check the generated output file
WeatherForecastGetModel
is missing.
Expected behavior
The tag-file option should correctly group and generate files based on tags while still ensuring all relevant models/types—including.
Additional context
Without using --group-strategy=tag-file
, openapi-zod-client generates all code properly in a single file, including all expected types. However, when using --group-strategy=tag-file
, the expected behavior of separating files based on tags does not work correctly, and WeatherForecastGetModel
is missing from the output.