Skip to content

AxenAPI Generator - generate code by OpenaAPI specification. Is used in AxenAPI Gradle Plugin

License

Notifications You must be signed in to change notification settings

AxenAPI/axenapi-generator

Repository files navigation

Add Axenapi-generator as a classpath. First steps:

  1. Add Axenapi-generator in classpath like this
buildscript {
    dependencies {
        classpath "pro.axenix-innovation:axenapi-generator:1.0.2-SNAPSHOT"
    }
}
  1. Add openapi-generator (you can use another version of generator)
plugins {
    id "org.openapi.generator" version '7.0.0'
}
  1. Add configuration for openapiGenerate. Use "kafka-codegen" as "generatorName".
openApiGenerate {
    generatorName = "kafka-codegen"
    inputSpec = getProjectDir().getAbsolutePath() + '/src/main/resources/joker.json'
    outputDir = getProjectDir().getAbsolutePath() + '/build'
    globalProperties = [
            apis           : "",
            models         : "",
            supportingFiles: 'ApiUtil.java'
    ]
    skipOverwrite = true
    configOptions = [
            useSpringBoot3 : "true",
            listenerPackage: 'axenapi.generated',
            modelPackage   : 'axenapi.generated.model',
            kafkaClient    : "false",
            interfaceOnly  : "false",
            useSpring3     : "false",
            resultWrapper  : "java.util.concurrent.CompletableFuture"
    ]
}

About

AxenAPI Generator - generate code by OpenaAPI specification. Is used in AxenAPI Gradle Plugin

Resources

License

Stars

Watchers

Forks

Packages