Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.455.7
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 17, 2024
1 parent cc4a9d9 commit 9e59391
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
lockVersion: 2.0.0
id: 66f99777-b2f2-4e45-9581-501d199e5c0c
management:
docChecksum: a776550f34009612df62ba6268f834e3
docChecksum: 3dbd165cb83aaf90203b78ec02c2a141
docVersion: 0.4.0
speakeasyVersion: 1.454.2
generationVersion: 2.477.4
releaseVersion: 7.22.2
configChecksum: 0b95a856ed24b181ff7e220c904eed08
speakeasyVersion: 1.455.7
generationVersion: 2.480.1
releaseVersion: 7.22.3
configChecksum: 7d8539b2874346a602fe8eb0815c8c27
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-java.git
repoSubDirectory: .
published: true
features:
java:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
core: 3.33.1
core: 3.33.3
deprecations: 2.81.1
downloadStreams: 0.1.1
globalSecurity: 2.82.7
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
speakeasyVersion: 1.454.2
speakeasyVersion: 1.455.7
sources:
first-source: {}
my-source:
sourceNamespace: my-source-new
sourceRevisionDigest: sha256:38bc50d58f1ed1af21f7a957a985caefcefcebc3f01b60eaca36225b0c2592ea
sourceBlobDigest: sha256:57b066b6505966df2aab772bec5bd33880a1a448bb68083b0a10cb6a5113edd5
sourceRevisionDigest: sha256:e8878f6d5111ba976eadd3fa6a282e0cad1e094fa0469558abc4cf5aaba00978
sourceBlobDigest: sha256:ee4e1c74ebb80bf3690713051d38bee7fa0793818cd6fd2840b4b2dc9a082d0c
tags:
- latest
- speakeasy-sdk-regen-1734048171
- speakeasy-sdk-regen-1734393768
- 0.4.0
targets:
java-target:
source: my-source
sourceNamespace: my-source-new
sourceRevisionDigest: sha256:38bc50d58f1ed1af21f7a957a985caefcefcebc3f01b60eaca36225b0c2592ea
sourceBlobDigest: sha256:57b066b6505966df2aab772bec5bd33880a1a448bb68083b0a10cb6a5113edd5
sourceRevisionDigest: sha256:e8878f6d5111ba976eadd3fa6a282e0cad1e094fa0469558abc4cf5aaba00978
sourceBlobDigest: sha256:ee4e1c74ebb80bf3690713051d38bee7fa0793818cd6fd2840b4b2dc9a082d0c
codeSamplesNamespace: my-source-java-code-samples
codeSamplesRevisionDigest: sha256:558028e87747513b53cab98889e9bdf190f4b139f07e1935b59cb28bf84fec7b
codeSamplesRevisionDigest: sha256:61a1d7c49e3a3e08108fb8619227c4d4045cf39e89b3f97f91f40869f349e6d0
py:
source: first-source
ts:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'dev.speakeasyapi:javaclientsdk:7.22.2'
implementation 'dev.speakeasyapi:javaclientsdk:7.22.3'
```

Maven:
```xml
<dependency>
<groupId>dev.speakeasyapi</groupId>
<artifactId>javaclientsdk</artifactId>
<version>7.22.2</version>
<version>7.22.3</version>
</dependency>
```

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2016,4 +2016,14 @@ Based on:
### Generated
- [java v7.22.2] .
### Releases
- [Maven Central v7.22.2] https://central.sonatype.com/artifact/dev.speakeasyapi/javaclientsdk/7.22.2 - .
- [Maven Central v7.22.2] https://central.sonatype.com/artifact/dev.speakeasyapi/javaclientsdk/7.22.2 - .

## 2024-12-17 00:02:43
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.455.7 (2.480.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v7.22.3] .
### Releases
- [Maven Central v7.22.3] https://central.sonatype.com/artifact/dev.speakeasyapi/javaclientsdk/7.22.3 - .
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tasks.withType(Javadoc) {
}

group = "dev.speakeasyapi"
version = "7.22.2"
version = "7.22.3"

sourcesJar {
archiveBaseName = "javaclientsdk"
Expand All @@ -88,7 +88,7 @@ publishing {
maven(MavenPublication) {
groupId = 'dev.speakeasyapi'
artifactId = 'javaclientsdk'
version = '7.22.2'
version = '7.22.3'

from components.java

Expand Down
1 change: 1 addition & 0 deletions docs/models/shared/RemoteSourceSubscriptionSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `baseSpecNamespaces` | List\<*String*> | :heavy_check_mark: | N/A |
| `ignoredNamespaces` | List\<*String*> | :heavy_minus_sign: | N/A |
| `outputNamespace` | *String* | :heavy_check_mark: | N/A |
| `overlayNamespaces` | List\<*String*> | :heavy_check_mark: | N/A |
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
java:
version: 7.22.2
version: 7.22.3
additionalDependencies: []
additionalPlugins: []
artifactID: javaclientsdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public String resolvedServerUrl() {
public String server;
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "0.4.0";
public static final String SDK_VERSION = "7.22.2";
public static final String GEN_VERSION = "2.477.4";
public static final String SDK_VERSION = "7.22.3";
public static final String GEN_VERSION = "2.480.1";
private static final String BASE_PACKAGE = "dev.speakeasyapi.javaclientsdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class File {
@SpeakeasyMetadata("multipartForm:content")
private byte[] content;

@SpeakeasyMetadata("multipartForm:name=file")
@SpeakeasyMetadata("multipartForm:name=fileName")
private String fileName;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Schema {
@SpeakeasyMetadata("multipartForm:content")
private byte[] content;

@SpeakeasyMetadata("multipartForm:name=schema")
@SpeakeasyMetadata("multipartForm:name=fileName")
private String fileName;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SuggestOpenAPIRequestBody {
@SpeakeasyMetadata("multipartForm:name=opts,json")
private Optional<? extends SuggestOptsOld> opts;

@SpeakeasyMetadata("multipartForm:file")
@SpeakeasyMetadata("multipartForm:file,name=schema")
private Schema schema;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class UploadReportRequestBody {
@SpeakeasyMetadata("multipartForm:name=data,json")
private Report data;

@SpeakeasyMetadata("multipartForm:file")
@SpeakeasyMetadata("multipartForm:file,name=file")
private File file;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class CodeSampleSchemaInput {
/**
* The OpenAPI file to be uploaded
*/
@SpeakeasyMetadata("multipartForm:file")
@SpeakeasyMetadata("multipartForm:file,name=schema_file")
private SchemaFile schemaFile;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,27 @@

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.speakeasyapi.javaclientsdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;


public class RemoteSourceSubscriptionSettings {

@JsonProperty("base_spec_namespaces")
private List<String> baseSpecNamespaces;

@JsonInclude(Include.NON_ABSENT)
@JsonProperty("ignored_namespaces")
private Optional<? extends List<String>> ignoredNamespaces;

@JsonProperty("output_namespace")
private String outputNamespace;

Expand All @@ -29,21 +37,37 @@ public class RemoteSourceSubscriptionSettings {
@JsonCreator
public RemoteSourceSubscriptionSettings(
@JsonProperty("base_spec_namespaces") List<String> baseSpecNamespaces,
@JsonProperty("ignored_namespaces") Optional<? extends List<String>> ignoredNamespaces,
@JsonProperty("output_namespace") String outputNamespace,
@JsonProperty("overlay_namespaces") List<String> overlayNamespaces) {
Utils.checkNotNull(baseSpecNamespaces, "baseSpecNamespaces");
Utils.checkNotNull(ignoredNamespaces, "ignoredNamespaces");
Utils.checkNotNull(outputNamespace, "outputNamespace");
Utils.checkNotNull(overlayNamespaces, "overlayNamespaces");
this.baseSpecNamespaces = baseSpecNamespaces;
this.ignoredNamespaces = ignoredNamespaces;
this.outputNamespace = outputNamespace;
this.overlayNamespaces = overlayNamespaces;
}

public RemoteSourceSubscriptionSettings(
List<String> baseSpecNamespaces,
String outputNamespace,
List<String> overlayNamespaces) {
this(baseSpecNamespaces, Optional.empty(), outputNamespace, overlayNamespaces);
}

@JsonIgnore
public List<String> baseSpecNamespaces() {
return baseSpecNamespaces;
}

@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<String>> ignoredNamespaces() {
return (Optional<List<String>>) ignoredNamespaces;
}

@JsonIgnore
public String outputNamespace() {
return outputNamespace;
Expand All @@ -64,6 +88,18 @@ public RemoteSourceSubscriptionSettings withBaseSpecNamespaces(List<String> base
return this;
}

public RemoteSourceSubscriptionSettings withIgnoredNamespaces(List<String> ignoredNamespaces) {
Utils.checkNotNull(ignoredNamespaces, "ignoredNamespaces");
this.ignoredNamespaces = Optional.ofNullable(ignoredNamespaces);
return this;
}

public RemoteSourceSubscriptionSettings withIgnoredNamespaces(Optional<? extends List<String>> ignoredNamespaces) {
Utils.checkNotNull(ignoredNamespaces, "ignoredNamespaces");
this.ignoredNamespaces = ignoredNamespaces;
return this;
}

public RemoteSourceSubscriptionSettings withOutputNamespace(String outputNamespace) {
Utils.checkNotNull(outputNamespace, "outputNamespace");
this.outputNamespace = outputNamespace;
Expand All @@ -87,6 +123,7 @@ public boolean equals(java.lang.Object o) {
RemoteSourceSubscriptionSettings other = (RemoteSourceSubscriptionSettings) o;
return
Objects.deepEquals(this.baseSpecNamespaces, other.baseSpecNamespaces) &&
Objects.deepEquals(this.ignoredNamespaces, other.ignoredNamespaces) &&
Objects.deepEquals(this.outputNamespace, other.outputNamespace) &&
Objects.deepEquals(this.overlayNamespaces, other.overlayNamespaces);
}
Expand All @@ -95,6 +132,7 @@ public boolean equals(java.lang.Object o) {
public int hashCode() {
return Objects.hash(
baseSpecNamespaces,
ignoredNamespaces,
outputNamespace,
overlayNamespaces);
}
Expand All @@ -103,6 +141,7 @@ public int hashCode() {
public String toString() {
return Utils.toString(RemoteSourceSubscriptionSettings.class,
"baseSpecNamespaces", baseSpecNamespaces,
"ignoredNamespaces", ignoredNamespaces,
"outputNamespace", outputNamespace,
"overlayNamespaces", overlayNamespaces);
}
Expand All @@ -111,6 +150,8 @@ public final static class Builder {

private List<String> baseSpecNamespaces;

private Optional<? extends List<String>> ignoredNamespaces = Optional.empty();

private String outputNamespace;

private List<String> overlayNamespaces;
Expand All @@ -125,6 +166,18 @@ public Builder baseSpecNamespaces(List<String> baseSpecNamespaces) {
return this;
}

public Builder ignoredNamespaces(List<String> ignoredNamespaces) {
Utils.checkNotNull(ignoredNamespaces, "ignoredNamespaces");
this.ignoredNamespaces = Optional.ofNullable(ignoredNamespaces);
return this;
}

public Builder ignoredNamespaces(Optional<? extends List<String>> ignoredNamespaces) {
Utils.checkNotNull(ignoredNamespaces, "ignoredNamespaces");
this.ignoredNamespaces = ignoredNamespaces;
return this;
}

public Builder outputNamespace(String outputNamespace) {
Utils.checkNotNull(outputNamespace, "outputNamespace");
this.outputNamespace = outputNamespace;
Expand All @@ -140,6 +193,7 @@ public Builder overlayNamespaces(List<String> overlayNamespaces) {
public RemoteSourceSubscriptionSettings build() {
return new RemoteSourceSubscriptionSettings(
baseSpecNamespaces,
ignoredNamespaces,
outputNamespace,
overlayNamespaces);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SchemaFile {
@SpeakeasyMetadata("multipartForm:content")
private byte[] content;

@SpeakeasyMetadata("multipartForm:name=schema_file")
@SpeakeasyMetadata("multipartForm:name=fileName")
private String fileName;

@JsonCreator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private static SerializedBody serializeMultipart(Object value)
}

if (metadata.file) {
serializeMultipartFile(builder, val);
serializeMultipartFile(metadata.name, builder, val);
} else if (metadata.json) {
ObjectMapper mapper = JSON.getMapper();
String json = mapper.writeValueAsString(val);
Expand Down Expand Up @@ -171,13 +171,12 @@ private static SerializedBody serializeMultipart(Object value)
}));
}

private static void serializeMultipartFile(MultipartEntityBuilder builder, Object file)
private static void serializeMultipartFile(String fieldName, MultipartEntityBuilder builder, Object file)
throws IllegalArgumentException, IllegalAccessException {
if (Types.getType(file.getClass()) != Types.OBJECT) {
throw new RuntimeException("Invalid type for multipart file");
}

String fieldName = "";
String fileName = "";
byte[] content = null;

Expand All @@ -199,12 +198,11 @@ private static void serializeMultipartFile(MultipartEntityBuilder builder, Objec
if (metadata.content) {
content = (byte[]) val;
} else {
fieldName = metadata.name;
fileName = Utils.valToString(val);
}
}

if (fieldName.isBlank() || fileName.isBlank() || content == null) {
if (fileName.isBlank() || content == null) {
throw new RuntimeException("Invalid multipart file");
}

Expand Down

0 comments on commit 9e59391

Please sign in to comment.