OpenAPITools / OpenAPITools/openapi-generator
[BUG] [dart-dio] Output document is not enclosed in symbols when example is a String type
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Output document is not enclosed in symbols when example is a String type.
Input
# openapi-3.0.yaml
openapi: 3.0.3
...
paths:
/test:
get:
parameters:
- name: query
in: query
required: true
schema:
type: string
example: This is a sample string
responses:
"200":
description: description
...
Outout
// Example code in doc/DefaultApi.md
...
final api = TestOpenapiDart().getDefaultApi();
final String query = This is a sample string; // String |
...
Expected Output
// Example code in doc/DefaultApi.md
...
final api = TestOpenapiDart().getDefaultApi();
final String query = 'This is a sample string'; // String |
...
openapi-generator version
6.3.0
OpenAPI declaration file content or url
java -jar openapi-generator-cli.jar generate -g dart-dio ...
Generation Details
Related issues/PRs
Suggest a fix
Check the type and add a symbol if it is a String.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dart-dio generator using the supplied OpenAPI YAML and CLI command, then inspect the generated doc/DefaultApi.md. Compare the String example with the expected quoted output; done means String examples are enclosed in quotes while other types remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100