Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #538
Closed
Open
Issue created Jul 11, 2018 by Administrator@rootContributor

[rust-server] how to cope with loss of `file` type?

Created by: bjgill

Description

Swagger v2 had three types to represent binary data: {type: string, format: binary}, {type: string, format: byte}, and {type: file}. In OpenAPI v3, we lost the last of these.

In rust-server, binary and byte were treated identically - as swagger::ByteArray. File was Box<Future<Item=Option<Box<Stream<Item=Vec<u8>, Error=Error> + Send>>, Error=Error> + Send>.

I'm not sure what the correct approach for OpenAPI v3 is. Should we keep one of binary/byte as swagger::ByteArray and move the other to use the same type as file used to? Do we keep binary/byte as-is and add in some rust-server-specific workaround for those wanting to retain the old file behaviour?

openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs

Discovered in https://github.com/OpenAPITools/openapi-generator/issues/307

Suggest a fix/enhancement
Assignee
Assign to
Time tracking