Skip to content

Commit

Permalink
prepare 1.5.0 release (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesdaniels authored Jul 31, 2024
1 parent b668199 commit 3058510
Show file tree
Hide file tree
Showing 14 changed files with 335 additions and 21 deletions.
14 changes: 8 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ id: 47e8e950-a454-4ebb-9f78-86fda7dfa0c2
management:
docChecksum: a34bd1c885aa42eb3175940494581f67
docVersion: 0.2.0
speakeasyVersion: 1.348.0
generationVersion: 2.380.1
releaseVersion: 1.4.1
configChecksum: 48a394faa7d98c1c724e0e7f2255fdd9
speakeasyVersion: 1.349.1
generationVersion: 2.382.1
releaseVersion: 1.5.0
configChecksum: 44fc809f2c311a351cc77e4e82675add
repoURL: https://github.com/StyraInc/opa-java.git
published: true
features:
java:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.1
core: 3.26.5
core: 3.27.0
examples: 2.81.3
flattening: 2.81.1
globalSecurity: 2.82.5
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.1
sdkHooks: 0.1.0
unions: 0.0.4
generatedFiles:
- src/main/java/com/styra/opa/openapi/SecuritySource.java
- src/main/java/com/styra/opa/openapi/models/shared/Security.java
- src/main/java/com/styra/opa/openapi/SDKConfiguration.java
- src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputRequestBuilder.java
- src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequestBuilder.java
Expand Down Expand Up @@ -105,6 +105,7 @@ generatedFiles:
- src/main/java/com/styra/opa/openapi/models/shared/BatchMixedResults.java
- src/main/java/com/styra/opa/openapi/models/shared/BatchSuccessfulPolicyEvaluation.java
- src/main/java/com/styra/opa/openapi/models/shared/HealthyServer.java
- src/main/java/com/styra/opa/openapi/models/shared/Security.java
- src/main/java/com/styra/opa/openapi/models/errors/Location.java
- src/main/java/com/styra/opa/openapi/models/errors/Errors.java
- src/main/java/com/styra/opa/openapi/models/errors/ClientError.java
Expand Down Expand Up @@ -141,6 +142,7 @@ generatedFiles:
- docs/models/shared/BatchMixedResults.md
- docs/models/shared/BatchSuccessfulPolicyEvaluation.md
- docs/models/shared/HealthyServer.md
- docs/models/shared/Security.md
- docs/models/errors/Location.md
- docs/models/errors/Errors.md
- docs/models/errors/ClientError.md
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: false
java:
version: 1.4.1
version: 1.5.0
additionalDependencies:
- testImplementation:org.junit.jupiter:junit-jupiter-api:5.8.2
- runtimeOnly:org.junit.jupiter:junit-jupiter-engine:5.8.2
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
speakeasyVersion: 1.348.0
speakeasyVersion: 1.349.1
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:c61841e36e9f636ea97dae6e7a01ff649b8faf336ebbaf407faf0fa6d977a18e
sourceBlobDigest: sha256:0414f3826ffba0b980269bf45175889350f906300b18bb5fdaf3dc5c8620260f
sourceRevisionDigest: sha256:c84f4ddcf4fce2263abf2b4d50f35c47e07b3315da81f1ff6df278e2665ac03a
sourceBlobDigest: sha256:97934d11779b4d006f16cefea9317685434366de3f6f16b8d78f297aa9722ba7
tags:
- latest
targets:
opa:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:c61841e36e9f636ea97dae6e7a01ff649b8faf336ebbaf407faf0fa6d977a18e
sourceBlobDigest: sha256:0414f3826ffba0b980269bf45175889350f906300b18bb5fdaf3dc5c8620260f
sourceRevisionDigest: sha256:c84f4ddcf4fce2263abf2b4d50f35c47e07b3315da81f1ff6df278e2665ac03a
sourceBlobDigest: sha256:97934d11779b4d006f16cefea9317685434366de3f6f16b8d78f297aa9722ba7
outLocation: /Users/cad/f/src/opa-java
workflow:
workflowVersion: 1.0.0
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to This Repository

Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.

## How to Report Issues

If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:

- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed

## Issue Triage and Upstream Fixes

We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.

## Contact

If you have any questions or need further assistance, please feel free to reach out by opening an issue.

Thank you for your understanding and cooperation!

The Maintainers
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -160,6 +163,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder()
Expand Down Expand Up @@ -217,6 +223,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder()
Expand Down Expand Up @@ -300,6 +309,9 @@ public class Application {
try {
OpaApiClient sdk = OpaApiClient.builder()
.serverIndex(0)
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -355,6 +367,9 @@ public class Application {
try {
OpaApiClient sdk = OpaApiClient.builder()
.serverURL("http://localhost:8181")
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -419,6 +434,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -449,6 +467,72 @@ public class Application {
```
<!-- End Error Handling [errors] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| ------------ | ------------ | ------------ |
| `bearerAuth` | http | HTTP Bearer |

You can set the security parameters through the `security` builder method when initializing the SDK client instance. For example:
```java
package hello.world;

import com.styra.opa.openapi.OpaApiClient;
import com.styra.opa.openapi.models.operations.*;
import com.styra.opa.openapi.models.shared.*;
import com.styra.opa.openapi.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
.pretty(false)
.acceptEncoding(GzipAcceptEncoding.GZIP)
.input(Input.of(8203.11d))
.call();

if (res.result().isPresent()) {
// handle response
}
} catch (com.styra.opa.openapi.models.errors.ClientError e) {
// handle exception
throw e;
} catch (com.styra.opa.openapi.models.errors.ServerError e) {
// handle exception
throw e;
} catch (com.styra.opa.openapi.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}

}
}
```
<!-- End Authentication [security] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

## Development
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,14 @@ Based on:
### Generated
- [java v1.4.1] .
### Releases
- [Maven Central v1.4.1] https://central.sonatype.com/artifact/com.styra.opa/openapi/1.4.1 - .
- [Maven Central v1.4.1] https://central.sonatype.com/artifact/com.styra.opa/openapi/1.4.1 - .

## 2024-07-09 00:20:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.349.1 (2.361.10) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v1.5.0] .
### Releases
- [Maven Central v1.5.0] https://central.sonatype.com/artifact/com.styra.opa/openapi/1.5.0 - .
9 changes: 9 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -70,6 +73,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder()
Expand Down Expand Up @@ -125,6 +131,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder()
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.styra'
artifactId = 'opa'
version = '1.4.1'
version = '1.5.0'

from components.java

Expand Down
8 changes: 8 additions & 0 deletions docs/models/shared/Security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Security


## Fields

| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `bearerAuth` | *Optional<? extends String>* | :heavy_minus_sign: | N/A |
15 changes: 15 additions & 0 deletions docs/sdks/opaapiclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteDefaultPolicyWithInputResponse res = sdk.executeDefaultPolicyWithInput()
Expand Down Expand Up @@ -116,6 +119,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecutePolicyRequest req = ExecutePolicyRequest.builder()
Expand Down Expand Up @@ -192,6 +198,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder()
Expand Down Expand Up @@ -271,6 +280,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder()
Expand Down Expand Up @@ -351,6 +363,9 @@ public class Application {
public static void main(String[] args) throws Exception {
try {
OpaApiClient sdk = OpaApiClient.builder()
.security(Security.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build())
.build();

HealthResponse res = sdk.health()
Expand Down
Loading

0 comments on commit 3058510

Please sign in to comment.