com.ancientlightstudios.quarkus.kotlin.openapi.parser.OpenApiReferences.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi.parser
private val topLevelObjectMatcher = Regex("#/components/(schemas|parameters|requestBodies|responses|headers)/([^/]+)")
fun String.nameSuggestion() = topLevelObjectMatcher.matchEntire(this)?.groupValues?.last()