Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #551
Closed
Open
Issue created Jul 12, 2018 by Administrator@rootContributor

Unable to use systemProperties in gradle plugin

Created by: FatCash

Description

Hi, I'm struggling to configure the gradle plugin to generate only model. I can't seem to pass any property at all in systemProperties. Is my syntax incorrect?

openApiGenerate {
    generatorName = "java"
    ....
    configOptions = [
            dateLibrary: "java8",
            useBeanValidation: true
    ]
    systemProperties = [
            modelDocs: "false"
    ]
}

gives: Caused by: java.lang.IllegalStateException: System.getProperty(key) must not be null at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:350) If sent as boolean it gives: Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at org.openapitools.generator.gradle.plugin.tasks.GenerateTask.doWork(GenerateTask.kt:543)

How to send these flags via gradle plugin? java -Dmodels -DmodelDocs=false -DmodelTests=false

openapi-generator version

org.openapitools:openapi-generator-gradle-plugin:3.1.0

Assignee
Assign to
Time tracking