swagger-api / swagger-api/swagger-codegen
Base64 parameters code generation
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When generating PHP code that will utilize base64 encoded data, no code is generated to provide base64 encoding/decoding.
Furthermore a search on base64 in this github repository does not bring up a base64 encoding system for ANY existing language. base64 seems to only be supported for HTTP authentication.
Swagger-codegen version
unknown, there does not seem to be a --version command.
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli.jar generate -l php -i ./lti.schema.mod.json -c ./sheroapi.json
Suggest a Fix
Review documentation and determine if base64 encoded data should be created for definitions such as:
"parameters": [
{
"name": "InputBinaryData",
"in": "body",
"required": true,
"schema": {
"type": "string",
"format": "binary"
}
}
],
In addition, determine if this is limited to the body or if it can be included in the url and/or query parameters. From what I can tell, this is supported by the current specification but rarely implemented.
If base64 encoding should be supported, test various framework generation to confirm if it works for any existing language.
Document languages supporting base64 encoding in generated code and languages not supporting it. Add documentation to Wiki so interested parties can implement.
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
Use the referenced binaryDataTest.json fixture and the documented java -jar generate -l php command as starting points. Compare handling of base64-encoded body, URL, and query parameters across generated languages, then document which languages support the behavior and which do not in the Wiki.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100