-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from teogor/bugfix/stitch-plugin-defaults
Prevent unintended null defaults in Stitch code generation
- Loading branch information
Showing
5 changed files
with
123 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
gradle-plugin/src/main/kotlin/dev/teogor/stitch/StitchExtensionImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2024 teogor (Teodor Grigor) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package dev.teogor.stitch | ||
|
||
import dev.teogor.stitch.api.StitchExtension | ||
|
||
/** | ||
* Base implementation for the [StitchExtension] interface. | ||
* | ||
* This abstract class provides default values for all properties of the | ||
* [StitchExtension] interface. | ||
* | ||
* You can extend this class and override properties to customize the behavior | ||
* of Stitch code generation. | ||
* | ||
* @see StitchExtension | ||
*/ | ||
abstract class StitchExtensionImpl : StitchExtension { | ||
|
||
/** | ||
* Controls whether to generate documentation comments in the generated code. | ||
* | ||
* By default, this is set to `true`. | ||
*/ | ||
override var addDocumentation: Boolean = true | ||
|
||
/** | ||
* Controls whether to generate operation functions for your Stitch schema. | ||
* | ||
* By default, this is set to `true`. | ||
*/ | ||
override var generateOperations: Boolean = true | ||
|
||
/** | ||
* Specifies the base package name for generated code or artifacts. | ||
* | ||
* By default, this is an empty string, meaning the generated code will be | ||
* placed in the root package. | ||
*/ | ||
override var generatedPackageName: String = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters