1 parent 72c94ff commit 49ea9d1Copy full SHA for 49ea9d1
1 file changed
src/main/kotlin/fr/asanokaze/openapihelper/parsing/OpenApiYamlParser.kt
@@ -47,16 +47,14 @@ class OpenApiYamlParser {
47
}
48
49
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
+ operation?.operationId ?: return null
+ return OpenApiOperation(
+ path = path,
+ method = method,
+ tags = operation.tags,
+ operationId = operation.operationId,
+ summary = operation.summary,
+ )
60
61
62
0 commit comments