[rust-server] Drop file support (#547)

* [rust-server] drop 'file' support

In swagger v2, we had 'binary', 'byte', and 'file'. OpenAPI v3 only has
the former two. This commit drops the old 'file' handling. This has the
side-effect of removing a half-complete implementation of form parameter handling.

This removes the ability to send files as streams, so will make life
harder for those wishing to send large files without running out of
memory.

* Remove all remaining uses of `hasFile`
This commit is contained in:
Benjamin Gill
2018-07-23 11:46:35 +01:00
committed by William Cheng
parent af3ca293e4
commit a9961a062a
17 changed files with 238 additions and 788 deletions

View File

@@ -657,6 +657,19 @@ paths:
- -1.2
format: double
type: number
requestBody:
content:
application/x-www-form-urlencoded:
schema:
properties:
enum_form_string:
default: -efg
description: Form parameter enum test (string)
enum:
- _abc
- -efg
- (xyz)
type: string
responses:
400:
content: {}
@@ -738,6 +751,10 @@ paths:
description: None
pattern: ^[A-Z].*
type: string
byte:
description: None
format: byte
type: string
binary:
description: None
format: binary
@@ -760,6 +777,7 @@ paths:
description: None
type: string
required:
- byte
- double
- number
- pattern_without_delimiter
@@ -1247,6 +1265,13 @@ components:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
array_of_enum:
items:
enum:
- UPPER
- lower
type: string
type: array
type: object
OuterComposite:
example:
@@ -1297,6 +1322,9 @@ components:
format: byte
pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
type: string
binary:
format: binary
type: string
date:
format: date
type: string
@@ -1331,6 +1359,15 @@ components:
- crab
type: string
type: array
array_array_enum:
items:
items:
enum:
- Cat
- Dog
type: string
type: array
type: array
type: object
OuterString:
type: string
@@ -1370,6 +1407,15 @@ components:
type: string
type: object
type: object
map_map_of_enum:
additionalProperties:
additionalProperties:
enum:
- UPPER
- lower
type: string
type: object
type: object
map_of_enum_string:
additionalProperties:
enum: