io.gitlab.jaxsonp.openapipublish.maven.SwaggerHubPublishMojo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-publish-maven-plugin Show documentation
Show all versions of openapi-publish-maven-plugin Show documentation
The Maven plugin of the openapi-publish project.
package io.gitlab.jaxsonp.openapipublish.maven
import io.gitlab.jaxsonp.openapipublish.core.publishers.SwaggerHubPublisher
import org.apache.maven.plugin.AbstractMojo
import org.apache.maven.plugins.annotations.LifecyclePhase
import org.apache.maven.plugins.annotations.Mojo
import org.apache.maven.plugins.annotations.Parameter
@Mojo(name = "swaggerhub-publish", defaultPhase = LifecyclePhase.DEPLOY)
class SwaggerHubPublishMojo: AbstractMojo() {
@Parameter(required = true)
lateinit var apiDir: String
@Parameter
var apiVersion: String? = null
@Parameter
var swaggerHubOnPremiseUrl: String? = null
@Parameter
var apiKey: String? = null
@Parameter(required = true)
lateinit var owner: String
@Parameter
var privateApi: Boolean? = null
@Parameter
var force: Boolean? = null
override fun execute() {
SwaggerHubPublisher(
apiDir = apiDir,
apiVersion = apiVersion,
swaggerHubOnPremiseUrl = swaggerHubOnPremiseUrl,
apiKey = apiKey,
owner = owner,
privateApi = privateApi,
force = force,
).publish()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy