Skip to content

Commit

Permalink
simplify: raml08/raml08openapi3: update msaPaths()
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Oct 29, 2022
1 parent 1d5631b commit 98a2abc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions raml08/raml08openapi3/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ var (
// using the `openapi3edit.OperationMore` struct: `path`, `method`, `summary`, `description`. OpenAPI
// `summary` is populated by the `displayName` property.
func msaPaths(basePath string, msa map[string]any, omSet *openapi3edit.OperationMoreSet) error {
if omSet == nil {
return ErrOperationMoreSetMissing
} else if msa == nil {
if len(msa) == 0 {
return nil
}
if omSet.OperationMores == nil {
} else if omSet == nil {
return ErrOperationMoreSetMissing
} else if omSet.OperationMores == nil {
omSet.OperationMores = []openapi3edit.OperationMore{}
}
basePath = strings.TrimSpace(basePath)
Expand Down

0 comments on commit 98a2abc

Please sign in to comment.