Skip to content
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

chore: 🐝 Update SDK - Generate #3

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
lockVersion: 2.0.0
id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9
management:
docChecksum: c4aa5fe08445d9bd9cce938a8e22a9bd
docChecksum: 93fd7098475aa331fae95503f8934b72
docVersion: v1
speakeasyVersion: 1.307.1
speakeasyVersion: 1.307.2
generationVersion: 2.342.2
releaseVersion: 0.0.1
configChecksum: ded0598933a8d75e7def29ab016062a4
releaseVersion: 0.0.2
configChecksum: cbacb66c514142b06e6d37a52d129dfe
repoURL: https://github.com/clerk/clerk-sdk-java.git
published: true
features:
java:
additionalDependencies: 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
java:
version: 0.0.1
version: 0.0.2
additionalDependencies: []
additionalPlugins: []
artifactID: backend-api
Expand Down
22 changes: 15 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
speakeasyVersion: 1.307.1
speakeasyVersion: 1.307.2
sources:
clerk-java-sdk:
sourceNamespace: clerk-java-sdk
sourceRevisionDigest: sha256:671a76348ffa42f50e48f36d00117419df09deedf8c407f5998533e01a8b64cb
sourceBlobDigest: sha256:e23b66a7b10f867245e42a1cd46af66f9ebee2db346f6a3bfcec0aa79ae2ac86
sourceRevisionDigest: sha256:9e02ef8a222cb78445ec7a7ac7bd777d669a4fddfe0467cdad28aa02fd69c2fb
sourceBlobDigest: sha256:be6a2adf86086a55368c73204dfb84b5ca2f9d8514f771aff33857624a212e56
tags:
- latest
- main
targets:
my-first-target:
source: clerk-java-sdk
sourceNamespace: clerk-java-sdk
sourceRevisionDigest: sha256:671a76348ffa42f50e48f36d00117419df09deedf8c407f5998533e01a8b64cb
sourceBlobDigest: sha256:e23b66a7b10f867245e42a1cd46af66f9ebee2db346f6a3bfcec0aa79ae2ac86
outLocation: /Users/kylemac/Sites/clerk/java-sdk/~/Sites/clerk/java-sdk
sourceRevisionDigest: sha256:9e02ef8a222cb78445ec7a7ac7bd777d669a4fddfe0467cdad28aa02fd69c2fb
sourceBlobDigest: sha256:be6a2adf86086a55368c73204dfb84b5ca2f9d8514f771aff33857624a212e56
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
clerk-java-sdk:
inputs:
- location: ../../../../openapi.yml
- location: ./openapi.yml
registry:
location: registry.speakeasyapi.dev/clerk/clerk/clerk-java-sdk
targets:
my-first-target:
target: java
source: clerk-java-sdk
publish:
java:
ossrhUsername: clerk
ossrhPassword: $ossrh_password
gpgSecretKey: $gpg_secret_key
gpgPassPhrase: $gpg_pass_phrase
1 change: 1 addition & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
clerk-java-sdk:
inputs:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.clerk.backend_api:openapi:0.0.1'
implementation 'com.clerk.backend_api:api:0.0.2'
```

Maven:
```xml
<dependency>
<groupId>com.clerk.backend_api</groupId>
<artifactId>openapi</artifactId>
<version>0.0.1</version>
<artifactId>api</artifactId>
<version>0.0.2</version>
</dependency>
```

Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## 2024-06-13 22:05:28
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.307.2 (2.342.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.0.2] .
### Releases
- [Maven Central v0.0.2] https://central.sonatype.com/artifact/com.clerk/backend-api/0.0.2 - .
114 changes: 114 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id 'maven-publish'
id 'signing'
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.0'
}

compileJava.options.encoding = "UTF-8"
Expand All @@ -21,11 +24,122 @@ repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}

model {
tasks.generatePomFileForMavenPublication {
destination = file("$buildDir/pom.xml")
}
}

jar {
dependsOn(":generatePomFileForMavenPublication")
archiveBaseName = "backend-api"

into("META-INF/maven/com.clerk/backend-api") {
from("$buildDir/pom.xml")
}
}

javadoc {
options.encoding = "UTF-8"

if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
options.addStringOption('Xdoclint:none', '-quiet')
}


tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
}
group = "com.clerk"
version = "0.0.2"

sourcesJar {
archiveBaseName = "backend-api"
}

javadocJar {
archiveBaseName = "backend-api"
}

sonatypeCentralUpload {
// This is your Sonatype generated username
username = System.getenv("SONATYPE_USERNAME")
// This is your sonatype generated password
password = System.getenv("SONATYPE_PASSWORD")

// This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
archives = files(
"$buildDir/libs/backend-api-${version}.jar",
"$buildDir/libs/backend-api-${version}-sources.jar",
"$buildDir/libs/backend-api-${version}-javadoc.jar"
)

// This is the pom file to upload. This is required by central
pom = file("$buildDir/pom.xml")

// This is your PGP private key. This is required to sign your files
signingKey = System.getenv("SONATYPE_SIGNING_KEY")
// This is your PGP private key passphrase to decrypt your private key
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE")
}
publishing {

publications {
maven(MavenPublication) {
groupId = 'com.clerk'
artifactId = 'backend-api'
version = '0.0.2'

from components.java

pom {
name = 'My Company Java SDK'
description = 'SDK enabling Java developers to easily integrate with the My Company API.'
url = 'https://github.com/owner/repo'
scm {
url = 'github.com/owner/repo'
connection = 'scm:git:ssh://[email protected]/owner/repo.git'
}
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://mit-license.org/'
}
}
developers {
developer {
name = 'My Company'
organization = 'My Company'
email = '[email protected]'
}
}
organization {
name = 'My Company'
url = 'www.mycompany.com'
}
}
}
}
}

if (!project.hasProperty('skip.signing')) {
signing {
def signingKey = findProperty("signingKey")
def signingPassphrase = findProperty("signingPassphrase")
useInMemoryPgpKeys(signingKey, signingPassphrase)
sign publishing.publications.maven
}
}

dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
Expand Down
12 changes: 2 additions & 10 deletions docs/sdks/organizations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,8 @@ public class Application {
.request(req)
.call();

while (true) {
if (res.organizations().isPresent()) {
// handle response
Optional<ListOrganizationsResponse> nextRes = res.next();
if (nextRes.isPresent()) {
res = nextRes.get();
} else {
break;
}
}
if (res.organizations().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
Expand Down
12 changes: 2 additions & 10 deletions docs/sdks/sessions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,8 @@ public class Application {
.request(req)
.call();

while (true) {
if (res.sessionList().isPresent()) {
// handle response
Optional<GetSessionListResponse> nextRes = res.next();
if (nextRes.isPresent()) {
res = nextRes.get();
} else {
break;
}
}
if (res.sessionList().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
Expand Down
12 changes: 2 additions & 10 deletions docs/sdks/users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,8 @@ public class Application {
.request(req)
.call();

while (true) {
if (res.userList().isPresent()) {
// handle response
Optional<GetUserListResponse> nextRes = res.next();
if (nextRes.isPresent()) {
res = nextRes.get();
} else {
break;
}
}
if (res.userList().isPresent()) {
// handle response
}
} catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
// handle exception
Expand Down
Loading