Skip to content

Getting error by using this serializationLibrary: DioSerializationLibrary.jsonSerializable, #188

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

Open
FaizanStokk opened this issue Apr 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@FaizanStokk
Copy link

Description of the bug

@openapi(
additionalProperties: DioProperties(
pubName: EnvKeys.stokk_api,
serializationLibrary: DioSerializationLibrary.jsonSerializable, // when i used this errors
),
inputSpec: InputSpec(path: input),
generatorName: Generator.dio,
runSourceGenOnOutput: true,
fetchDependencies: true,
forceAlwaysRun: true,
outputDirectory: output,
skipIfSpecIsUnchanged: false,
debugLogging: true,
)

Steps to reproduce

@openapi(
additionalProperties: DioProperties(
pubName: EnvKeys.stokk_api,
serializationLibrary: DioSerializationLibrary.jsonSerializable, // when i used this errors
),
inputSpec: InputSpec(path: input),
generatorName: Generator.dio,
runSourceGenOnOutput: true,
fetchDependencies: true,
forceAlwaysRun: true,
outputDirectory: output,
skipIfSpecIsUnchanged: false,
debugLogging: true,
)

Minimal openapi specification

@openapi(
additionalProperties: DioProperties(
pubName: EnvKeys.stokk_api,
serializationLibrary: DioSerializationLibrary.jsonSerializable, // when i used this errors
),
inputSpec: InputSpec(path: input),
generatorName: Generator.dio,
runSourceGenOnOutput: true,
fetchDependencies: true,
forceAlwaysRun: true,
outputDirectory: output,
skipIfSpecIsUnchanged: false,
debugLogging: true,
)

Annotation used

@openapi(
additionalProperties: DioProperties(
pubName: EnvKeys.stokk_api,
serializationLibrary: DioSerializationLibrary.jsonSerializable, // when i used this errors
),
inputSpec: InputSpec(path: input),
generatorName: Generator.dio,
runSourceGenOnOutput: true,
fetchDependencies: true,
forceAlwaysRun: true,
outputDirectory: output,
skipIfSpecIsUnchanged: false,
debugLogging: true,
)

Expected behavior

@openapi(
additionalProperties: DioProperties(
pubName: EnvKeys.stokk_api,
serializationLibrary: DioSerializationLibrary.jsonSerializable, // when i used this errors
),
inputSpec: InputSpec(path: input),
generatorName: Generator.dio,
runSourceGenOnOutput: true,
fetchDependencies: true,
forceAlwaysRun: true,
outputDirectory: output,
skipIfSpecIsUnchanged: false,
debugLogging: true,
)

Logs

[SEVERE] openapi_generator on lib/my_app.dart:
Failed to generate content.

Could not complete source generation Failed to generate source code. Build Command output: Failed to update packages.
 #0      OpenapiGenerator.runSourceGen (package:openapi_generator/src/openapi_generator_runner.dart:416:34)
<asynchronous suspension>
#1      OpenapiGenerator.generateSources.<anonymous closure> (package:openapi_generator/src/openapi_generator_runner.dart:361:7)
<asynchronous suspension>
#2      OpenapiGenerator.generateSources (package:openapi_generator/src/openapi_generator_runner.dart:360:12)
<asynchronous suspension>

Screenshots

No response

Platform

iOS

Library version

6.1.0

Flutter version

3.29.2

Flutter channel

stable

Additional context


@FaizanStokk FaizanStokk added the bug Something isn't working label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant