feat(import): preserve supported HTTP contracts
This commit is contained in:
1 parent
083974c27f
commit
f8ee7c9bfe
87 files changed
+7496
-534
No files matched your search
@@ -310,6 +310,9 @@ fn idempotent_post_operation() -> Operation<Schema, MappingSet> {
|
||||
method: HttpMethod::Post,
|
||||
path_template: "/orders".to_owned(),
|
||||
static_headers: BTreeMap::new(),
|
||||
request_contract: None,
|
||||
response_contract: Vec::new(),
|
||||
multipart_field_mime_types: BTreeMap::new(),
|
||||
}),
|
||||
input_schema: object_schema(BTreeMap::from([("request_id".to_owned(), string_schema())])),
|
||||
output_schema: object_schema(BTreeMap::from([("result".to_owned(), string_schema())])),
|
||||
@@ -359,6 +362,7 @@ fn idempotent_post_operation() -> Operation<Schema, MappingSet> {
|
||||
fn object_schema(fields: BTreeMap<String, Schema>) -> Schema {
|
||||
Schema {
|
||||
kind: SchemaKind::Object,
|
||||
format: None,
|
||||
description: None,
|
||||
required: true,
|
||||
nullable: false,
|
||||
@@ -373,6 +377,7 @@ fn object_schema(fields: BTreeMap<String, Schema>) -> Schema {
|
||||
fn string_schema() -> Schema {
|
||||
Schema {
|
||||
kind: SchemaKind::String,
|
||||
format: None,
|
||||
description: None,
|
||||
required: true,
|
||||
nullable: false,
|
||||
|
||||
Reference in new issue
Block a user