We can add custom tags to generated OPS
This commit is contained in:
@@ -119,6 +119,24 @@ def test_paths_operation_requestBody():
|
||||
}
|
||||
|
||||
|
||||
def test_paths_operation_tags():
|
||||
oas = OpenApiSpec3()
|
||||
operation = oas.paths["/users/{petId}"].get
|
||||
assert operation.tags == []
|
||||
operation.tags = ['pets']
|
||||
|
||||
assert oas.spec['paths']['/users/{petId}'] == {
|
||||
'get': {
|
||||
'tags': ['pets']
|
||||
}
|
||||
}
|
||||
|
||||
operation.tags = []
|
||||
assert oas.spec['paths']['/users/{petId}'] == {
|
||||
'get': {}
|
||||
}
|
||||
|
||||
|
||||
def test_paths_operation_responses():
|
||||
oas = OpenApiSpec3()
|
||||
response = oas.paths["/users/{petId}"].get.responses[200]
|
||||
|
||||
Reference in New Issue
Block a user