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
@@ -85,6 +85,7 @@ fn infer_safety_class(operation: &RuntimeOperation) -> OperationSafetyClass {
|
||||
match &operation.target {
|
||||
Target::Rest(target) => match target.method {
|
||||
HttpMethod::Get => OperationSafetyClass::Read,
|
||||
HttpMethod::Head | HttpMethod::Options => OperationSafetyClass::Read,
|
||||
HttpMethod::Delete => OperationSafetyClass::Destructive,
|
||||
HttpMethod::Post | HttpMethod::Put | HttpMethod::Patch => OperationSafetyClass::Write,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user