-
Couldn't load subscription status.
- Fork 2
chore: gen class #59
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
base: main
Are you sure you want to change the base?
chore: gen class #59
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ plugins { | |
| id 'io.qameta.allure' version '2.11.2' | ||
| id 'org.ajoberstar.grgit' version '5.2.0' | ||
| id 'org.jreleaser' version '1.19.0' | ||
| id("org.openapi.generator") version "7.14.0" | ||
| } | ||
|
|
||
| repositories { | ||
|
|
@@ -56,6 +57,10 @@ dependencies { | |
| implementation "org.bouncycastle:bcprov-jdk18on:${bouncycastleVersion}" | ||
| implementation "org.json:json:${jsonVersion}" | ||
| implementation "org.greenbytes.http:structured-fields:${structuredFieldsVersion}" | ||
| // OpenAI generate model dependencies | ||
| implementation "com.squareup.okhttp3:okhttp:4.12.0" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this one needed specifically? |
||
| implementation "com.google.code.gson:gson:2.11.0" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have jackson - can we configure it to use that instead? |
||
| implementation "jakarta.annotation:jakarta.annotation-api:2.1.1" | ||
|
|
||
| testImplementation platform("org.junit:junit-bom:${junitVersion}") | ||
| testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}" | ||
|
|
@@ -187,3 +192,37 @@ tasks.register('allureE2ETestReport') { | |
| tasks.named('allureReport') { | ||
| enabled = false | ||
| } | ||
|
|
||
| tasks.openApiGenerate { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add the command called to the README somewhere so people know how to re-generate types? |
||
| generatorName.set("java") | ||
| inputSpec.set("$rootDir/spec.yaml") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it need to come from a file or can make a HTTP call to KERIA in real time? |
||
| outputDir.set("$buildDir/generated".toString()) | ||
| modelPackage.set("org.cardanofoundation.signify.generated.keria.model") | ||
| invokerPackage.set("org.cardanofoundation.signify.generated.keria.model") | ||
| // globalProperties.set([ | ||
| // models: "" | ||
| // ]) | ||
| configOptions = [ | ||
| library : "resttemplate", | ||
| useGson : "true", | ||
| useJakartaEe : "true" | ||
| ] | ||
| } | ||
|
|
||
| sourceSets { | ||
| main { | ||
| java { | ||
| srcDir "$buildDir/generated/src/main/java" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| //tasks.register('copyGeneratedModels', Copy) { | ||
| // dependsOn tasks.openApiGenerate | ||
| // from("$buildDir/generated/src/main/java/org/cardanofoundation/signify/generated/keria/model") | ||
| // into("src/main/java/org/cardanofoundation/signify/generated/keria/model") | ||
| //} | ||
| // | ||
| //tasks.named("openApiGenerate") { | ||
| // finalizedBy(copyGeneratedModels) | ||
| //} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR, we should generate the types and commit them, and them import them to the APIs for use to replace
Object