Skip to content

Commit 49ea9d1

Browse files
author
Rabah Meradi
committed
Ignore operation with no operationId for now
1 parent 72c94ff commit 49ea9d1

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/main/kotlin/fr/asanokaze/openapihelper/parsing/OpenApiYamlParser.kt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ class OpenApiYamlParser {
4747
}
4848

4949
private fun map(path: String, method: HttpMethod, operation: Operation?): OpenApiOperation? {
50-
if (operation != null) {
51-
return OpenApiOperation(
52-
path = path,
53-
method = method,
54-
tags = operation.tags,
55-
operationId = operation.operationId,
56-
summary = operation.summary,
57-
)
58-
}
59-
return null
50+
operation?.operationId ?: return null
51+
return OpenApiOperation(
52+
path = path,
53+
method = method,
54+
tags = operation.tags,
55+
operationId = operation.operationId,
56+
summary = operation.summary,
57+
)
6058
}
6159

6260

0 commit comments

Comments
 (0)