Skip to content

Commit

Permalink
disable jsonSchema2Pojo plugin (does not work in CI)
Browse files Browse the repository at this point in the history
  • Loading branch information
asafc committed Feb 20, 2023
1 parent 68f0830 commit 983db70
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
// auto release to maven central (skip sonatype manual nexus release process)
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
// translate json schemas to java classes
id "org.jsonschema2pojo" version "1.1.3"
// id "org.jsonschema2pojo" version "1.1.3"
}

// It is important to set the group and the version to the root project
Expand Down Expand Up @@ -78,73 +78,73 @@ dependencies {

}

jsonSchema2Pojo {
// Location of the JSON Schema file(s). This may refer to a single file or a directory of files.
source = files("schemas/")

// Target directory for generated Java source files. The plugin will add this directory to the
// java source set so the compiler will find and compile the newly generated source files.
targetDirectory = file("src/main/java")

// Package name used for generated Java classes (for types where a fully qualified name has not
// been supplied in the schema using the 'javaType' property).
targetPackage = 'io.permit.sdk.openapi.models'

// Whether to allow 'additional' properties to be supported in classes by adding a map to
// hold these. This is true by default, meaning that the schema rule 'additionalProperties'
// controls whether the map is added. Set this to false to globally disable additional properties.
includeAdditionalProperties = false

// Whether to include a javax.annotation.Generated (Java 8 and lower) or
// javax.annotation.processing.Generated (Java 9+) in on generated types (default true).
// See also: targetVersion.
includeGeneratedAnnotation = true

// Whether to use the 'title' property of the schema to decide the class name (if not
// set to true, the filename and property names are used).
useTitleAsClassname = true

// Whether to empty the target directory before generation occurs, to clear out all source files
// that have been generated previously. <strong>Be warned</strong>, when activated this option
// will cause jsonschema2pojo to <strong>indiscriminately delete the entire contents of the target
// directory (all files and folders)</strong> before it begins generating sources.
removeOldOutput = false

// Whether to generate builder-style methods of the form withXxx(value) (that return this),
// alongside the standard, void-return setters.
generateBuilders = true

// If set to true, then the gang of four builder pattern will be used to generate builders on
// generated classes. Note: This property works in collaboration with generateBuilders.
// If generateBuilders is false then this property will not do anything.
useInnerClassBuilders = false

// Whether to include hashCode and equals methods in generated Java types.
includeHashcodeAndEquals = false

// Whether to include a toString method in generated Java types.
includeToString = false

// Whether to include getters or to omit these accessor methods and create public fields instead.
includeGetters = false

// Whether to include setters or to omit these accessor methods and create public fields instead.
includeSetters = false

// Whether to use java.util.Optional for getters on properties that are not required
useOptionalForGetters = true

// Whether to generate constructors or not.
includeConstructors = true

// Whether to include only 'required' fields in generated constructors
constructorsRequiredPropertiesOnly = true

annotationStyle = 'gson'

// Whether to initialize Set and List fields as empty collections, or leave them as null.
initializeCollections = false
}
//jsonSchema2Pojo {
// // Location of the JSON Schema file(s). This may refer to a single file or a directory of files.
// source = files("schemas/")
//
// // Target directory for generated Java source files. The plugin will add this directory to the
// // java source set so the compiler will find and compile the newly generated source files.
// targetDirectory = file("src/main/java")
//
// // Package name used for generated Java classes (for types where a fully qualified name has not
// // been supplied in the schema using the 'javaType' property).
// targetPackage = 'io.permit.sdk.openapi.models'
//
// // Whether to allow 'additional' properties to be supported in classes by adding a map to
// // hold these. This is true by default, meaning that the schema rule 'additionalProperties'
// // controls whether the map is added. Set this to false to globally disable additional properties.
// includeAdditionalProperties = false
//
// // Whether to include a javax.annotation.Generated (Java 8 and lower) or
// // javax.annotation.processing.Generated (Java 9+) in on generated types (default true).
// // See also: targetVersion.
// includeGeneratedAnnotation = true
//
// // Whether to use the 'title' property of the schema to decide the class name (if not
// // set to true, the filename and property names are used).
// useTitleAsClassname = true
//
// // Whether to empty the target directory before generation occurs, to clear out all source files
// // that have been generated previously. <strong>Be warned</strong>, when activated this option
// // will cause jsonschema2pojo to <strong>indiscriminately delete the entire contents of the target
// // directory (all files and folders)</strong> before it begins generating sources.
// removeOldOutput = false
//
// // Whether to generate builder-style methods of the form withXxx(value) (that return this),
// // alongside the standard, void-return setters.
// generateBuilders = true
//
// // If set to true, then the gang of four builder pattern will be used to generate builders on
// // generated classes. Note: This property works in collaboration with generateBuilders.
// // If generateBuilders is false then this property will not do anything.
// useInnerClassBuilders = false
//
// // Whether to include hashCode and equals methods in generated Java types.
// includeHashcodeAndEquals = false
//
// // Whether to include a toString method in generated Java types.
// includeToString = false
//
// // Whether to include getters or to omit these accessor methods and create public fields instead.
// includeGetters = false
//
// // Whether to include setters or to omit these accessor methods and create public fields instead.
// includeSetters = false
//
// // Whether to use java.util.Optional for getters on properties that are not required
// useOptionalForGetters = true
//
// // Whether to generate constructors or not.
// includeConstructors = true
//
// // Whether to include only 'required' fields in generated constructors
// constructorsRequiredPropertiesOnly = true
//
// annotationStyle = 'gson'
//
// // Whether to initialize Set and List fields as empty collections, or leave them as null.
// initializeCollections = false
//}

publishing {
repositories {
Expand Down

0 comments on commit 983db70

Please sign in to comment.