-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
2,105 additions
and
149 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
19 changes: 12 additions & 7 deletions
19
...erator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Default.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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
/** | ||
* Specifies a default value for the annotated object. | ||
*/ | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Default(val default: String) |
19 changes: 12 additions & 7 deletions
19
...tor-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Deprecated.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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
|
||
/** | ||
* Specifies whether the annotated object is deprecated. | ||
* @param deprecated whether the object is deprecated | ||
*/ | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Deprecated(val deprecated: Boolean = true) |
5 changes: 5 additions & 0 deletions
5
...or-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Description.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
/** | ||
* Specifies a description of the annotated object. | ||
* @param description a short description | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Description(val description: String) |
5 changes: 5 additions & 0 deletions
5
...erator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Example.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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
/** | ||
* Specifies an example value for the annotated object. Add annotation multiple times for multiple different example values. | ||
* @param example the example value as a string | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@Repeatable | ||
annotation class Example(val example: String) |
5 changes: 5 additions & 0 deletions
5
...kenerator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Name.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 |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
/** | ||
* Specify a name for the annotated class. | ||
* @param name the name | ||
* @param qualifiedName the qualified name (optional, leave as empty string to use [name]) | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Name(val name: String, val qualifiedName: String = "") |
18 changes: 18 additions & 0 deletions
18
...rator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Optional.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,18 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
|
||
/** | ||
* Specifies that the annotated object is optional, i.e. not required. | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Optional |
18 changes: 18 additions & 0 deletions
18
...rator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Required.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,18 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
|
||
/** | ||
* Specifies that the annotated object is required. | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.FUNCTION | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Required |
5 changes: 5 additions & 0 deletions
5
...enerator-core/src/main/kotlin/io/github/smiley4/schemakenerator/core/annotations/Title.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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package io.github.smiley4.schemakenerator.core.annotations | ||
|
||
import kotlinx.serialization.ExperimentalSerializationApi | ||
import kotlinx.serialization.SerialInfo | ||
|
||
/** | ||
* Specify a title for the annotated class. | ||
* @param title the title | ||
*/ | ||
@OptIn(ExperimentalSerializationApi::class) | ||
@Target( | ||
AnnotationTarget.CLASS, | ||
) | ||
@SerialInfo | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Title(val title: 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
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
Oops, something went wrong.