mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
Update goai_path.go (#2029)
This commit is contained in:
@ -311,6 +311,12 @@ func (oai *OpenApiV3) removeOperationDuplicatedProperties(operation Operation) {
|
||||
}
|
||||
|
||||
for _, requestBodyContent := range operation.RequestBody.Value.Content {
|
||||
|
||||
// Check request body schema
|
||||
if requestBodyContent.Schema == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Check request body schema ref.
|
||||
if schema := oai.Components.Schemas.Get(requestBodyContent.Schema.Ref); schema != nil {
|
||||
schema.Value.Required = oai.removeItemsFromArray(schema.Value.Required, duplicatedParameterNames)
|
||||
|
||||
Reference in New Issue
Block a user