generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Schema Registry #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
elifKurtay
wants to merge
36
commits into
micronaut-projects:1.5.x
Choose a base branch
from
elifKurtay:schema-registry
base: 1.5.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Schema Registry #142
Changes from 28 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
12d1020
new module
elifKurtay ac5c4c5
fix generated source directory
elifKurtay b100b1d
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay 29894eb
confluent definition files
elifKurtay fd88958
Merge branch 'micronaut-projects:1.4.x' into schema-registry
elifKurtay 74074b3
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay 3694457
client service draft
elifKurtay 41337bb
clean up interface
elifKurtay 8a06409
configuration properties added
elifKurtay 21a9daf
switch to declarative client
elifKurtay f4a284d
new responses and broken filter
elifKurtay 5ebba70
Merge branch 'micronaut-projects:1.5.x' into schema-registry
elifKurtay 9ee9d84
declarative with filter auth
elifKurtay cb80b92
GeneratedFromSchema annotation
elifKurtay 320b399
Merge branch 'micronaut-projects:1.5.x' into schema-registry
elifKurtay b64b3b3
push local to registry
elifKurtay 2e5a96d
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay 1ef41b2
re-org
elifKurtay a7af47c
controller tests
elifKurtay b43df6d
Merge branch 'micronaut-projects:1.5.x' into schema-registry
elifKurtay ae6a4f3
filter matcher
elifKurtay 0d00ba0
filter matcher
elifKurtay 6c89cd8
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay bdeba15
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay 63db930
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay 5c7244c
basic auth and no auth clients
elifKurtay bea2d80
fix multiple clients
elifKurtay 5c68e30
manager check and disable
elifKurtay d9791d5
Code review
elifKurtay 35472b2
Minor changes
andriy-dmytruk ccf8bd7
remove confluent test
elifKurtay b7a2bad
Merge branch 'micronaut-projects:1.5.x' into schema-registry
elifKurtay 8d3e675
small cr changes
elifKurtay 0a9ed1b
Merge remote-tracking branch 'fork/schema-registry' into schema-registry
elifKurtay acfe5c9
manager test added
elifKurtay 4ee51d3
add docs
elifKurtay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
json-schema-annotations/src/main/java/io/micronaut/jsonschema/GeneratedFromSchema.java
This file contains hidden or 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,40 @@ | ||
/* | ||
* Copyright 2017-2024 original authors | ||
* | ||
* 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 io.micronaut.jsonschema; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* An annotation that signals that the object was generated from json schema. | ||
* | ||
* @since 1.5.0 | ||
* @author Elif Kurtay | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.TYPE }) | ||
public @interface GeneratedFromSchema { | ||
|
||
/** | ||
* The title of the JSON schema file used to generate the object. | ||
* | ||
* @return The fileName | ||
*/ | ||
String fileName() default ""; | ||
|
||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,50 @@ | ||
import io.micronaut.build.internal.generator.BeanGeneratorTask | ||
|
||
plugins { | ||
id("io.micronaut.build.internal.json-schema-module") | ||
id("io.micronaut.build.internal.test-suite-generator-java") | ||
} | ||
|
||
dependencies { | ||
compileOnly(mn.micronaut.core.processor) | ||
|
||
implementation(projects.micronautJsonSchemaAnnotations) | ||
implementation(mn.micronaut.http) | ||
implementation(mn.micronaut.http.client) | ||
implementation(mn.micronaut.jackson.databind) | ||
implementation(mnSerde.micronaut.serde.jackson) | ||
implementation(mnValidation.validation) | ||
|
||
annotationProcessor(mn.micronaut.http.validation) | ||
annotationProcessor(mnSerde.micronaut.serde.processor) | ||
|
||
testAnnotationProcessor(mn.micronaut.inject.java) | ||
testImplementation(mn.micronaut.inject) | ||
testImplementation(mn.micronaut.http.server.netty) | ||
testImplementation(mnTest.micronaut.test.junit5) | ||
testImplementation(libs.junit.jupiter.api) | ||
testRuntimeOnly(libs.junit.jupiter.engine) | ||
} | ||
|
||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
def animalGenerator = tasks.register("generateAnimals", BeanGeneratorTask) { | ||
language = "java" | ||
classpath.from(configurations.beanGenerator) | ||
jsonFile.convention(layout.projectDirectory.file("src/test/resources/animal.schema.json")) | ||
outputDirectory.convention(layout.buildDirectory.dir("generated/jsonSchema")) | ||
packageName.convention("io.micronaut.jsonschema.generator.animals") | ||
} | ||
|
||
tasks.named("generateAnimals") { | ||
} | ||
|
||
sourceSets { | ||
test { | ||
java.srcDir('src/test/java') | ||
java.srcDir(animalGenerator.map(BeanGeneratorTask::getGeneratedSourcesDirectory)) | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.