mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Refactored SecurityRequirement **breaking change**
The v3 model is wrong and out of sync with the spec. It's been corrected, so the v2 and v2 model for SecurityRequirement have been collapsed down into a base model., they are the same data structures. This has allowed me to delete the complexity of sharing two different models for the same structure, by unifying the model correctly. I am not sure why I decided to change the v3 model, oh well, its been corrected. Long live swagger!
This commit is contained in:
@@ -337,10 +337,10 @@ func TestNewDocument_Paths(t *testing.T) {
|
||||
assert.Len(t, okResp.Links, 2)
|
||||
assert.Equal(t, "locateBurger", okResp.Links["LocateBurger"].OperationId)
|
||||
assert.Equal(t, 305, okResp.Links["LocateBurger"].GoLow().OperationId.ValueNode.Line)
|
||||
assert.Len(t, burgersOp.Post.Security.ValueRequirements[0], 1)
|
||||
assert.Len(t, burgersOp.Post.Security.ValueRequirements[0]["OAuthScheme"], 2)
|
||||
assert.Equal(t, "read:burgers", burgersOp.Post.Security.ValueRequirements[0]["OAuthScheme"][0])
|
||||
assert.Equal(t, 118, burgersOp.Post.Security.GoLow().ValueRequirements[0].ValueNode.Line)
|
||||
assert.Len(t, burgersOp.Post.Security[0].Requirements, 1)
|
||||
assert.Len(t, burgersOp.Post.Security[0].Requirements["OAuthScheme"], 2)
|
||||
assert.Equal(t, "read:burgers", burgersOp.Post.Security[0].Requirements["OAuthScheme"][0])
|
||||
assert.Equal(t, 118, burgersOp.Post.Security[0].GoLow().Requirements.ValueNode.Line)
|
||||
assert.Len(t, burgersOp.Post.Servers, 1)
|
||||
assert.Equal(t, "https://pb33f.io", burgersOp.Post.Servers[0].URL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user