diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8755b9f..6104b08 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,17 +3,17 @@ id: 47e8e950-a454-4ebb-9f78-86fda7dfa0c2 management: docChecksum: 54d33facef3aa19f358d15ab44e34141 docVersion: 0.2.0 - speakeasyVersion: 1.376.0 - generationVersion: 2.402.5 - releaseVersion: 1.7.0 - configChecksum: 1e364b7503baf8ad2a9aca5d31bbc6b5 + speakeasyVersion: 1.396.9 + generationVersion: 2.415.7 + releaseVersion: 1.7.1 + configChecksum: 8c11f4ec3a7e33d7e2995371c330b364 repoURL: https://github.com/StyraInc/opa-java.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.29.4 + core: 3.29.7 examples: 2.81.3 flattening: 2.81.1 globalSecurity: 2.82.7 @@ -22,22 +22,101 @@ features: sdkHooks: 0.1.0 unions: 0.0.5 generatedFiles: - - src/main/java/com/styra/opa/openapi/SecuritySource.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 - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequestBuilder.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequestBuilder.java - - src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java - - src/main/java/com/styra/opa/openapi/models/operations/SDKMethodInterfaces.java - - src/main/java/com/styra/opa/openapi/OpaApiClient.java - .gitattributes + - CONTRIBUTING.md + - USAGE.md - build.gradle + - docs/models/errors/BatchServerError.md + - docs/models/errors/ClientError.md + - docs/models/errors/Errors.md + - docs/models/errors/Location.md + - docs/models/errors/ServerError.md + - docs/models/errors/ServerErrorErrors.md + - docs/models/errors/ServerErrorLocation.md + - docs/models/errors/UnhealthyServer.md + - docs/models/operations/ExecuteBatchPolicyWithInputRequest.md + - docs/models/operations/ExecuteBatchPolicyWithInputRequestBody.md + - docs/models/operations/ExecuteBatchPolicyWithInputResponse.md + - docs/models/operations/ExecuteDefaultPolicyWithInputRequest.md + - docs/models/operations/ExecuteDefaultPolicyWithInputResponse.md + - docs/models/operations/ExecutePolicyRequest.md + - docs/models/operations/ExecutePolicyResponse.md + - docs/models/operations/ExecutePolicyWithInputRequest.md + - docs/models/operations/ExecutePolicyWithInputRequestBody.md + - docs/models/operations/ExecutePolicyWithInputResponse.md + - docs/models/operations/HealthRequest.md + - docs/models/operations/HealthResponse.md + - docs/models/shared/BatchMixedResults.md + - docs/models/shared/BatchSuccessfulPolicyEvaluation.md + - docs/models/shared/Errors.md + - docs/models/shared/Explain.md + - docs/models/shared/GzipAcceptEncoding.md + - docs/models/shared/GzipContentEncoding.md + - docs/models/shared/HealthyServer.md + - docs/models/shared/Input.md + - docs/models/shared/Location.md + - docs/models/shared/Provenance.md + - docs/models/shared/Responses.md + - docs/models/shared/Result.md + - docs/models/shared/Revision.md + - docs/models/shared/Security.md + - docs/models/shared/ServerErrorWithStatusCode.md + - docs/models/shared/SuccessfulPolicyResponse.md + - docs/models/shared/SuccessfulPolicyResponseWithStatusCode.md + - docs/sdks/opaapiclient/README.md - gradle/wrapper/gradle-wrapper.jar - gradle/wrapper/gradle-wrapper.properties - gradlew - gradlew.bat - settings.gradle + - src/main/java/com/styra/opa/openapi/OpaApiClient.java + - src/main/java/com/styra/opa/openapi/SDKConfiguration.java + - src/main/java/com/styra/opa/openapi/SecuritySource.java + - src/main/java/com/styra/opa/openapi/models/errors/AuthException.java + - src/main/java/com/styra/opa/openapi/models/errors/BatchServerError.java + - src/main/java/com/styra/opa/openapi/models/errors/ClientError.java + - src/main/java/com/styra/opa/openapi/models/errors/Errors.java + - src/main/java/com/styra/opa/openapi/models/errors/Location.java + - src/main/java/com/styra/opa/openapi/models/errors/SDKError.java + - src/main/java/com/styra/opa/openapi/models/errors/ServerError.java + - src/main/java/com/styra/opa/openapi/models/errors/ServerErrorErrors.java + - src/main/java/com/styra/opa/openapi/models/errors/ServerErrorLocation.java + - src/main/java/com/styra/opa/openapi/models/errors/UnhealthyServer.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequestBody.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequestBuilder.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputResponse.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputRequest.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputRequestBuilder.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputResponse.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequestBuilder.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyResponse.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequestBody.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequestBuilder.java + - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputResponse.java + - src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java + - src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java + - src/main/java/com/styra/opa/openapi/models/operations/HealthResponse.java + - src/main/java/com/styra/opa/openapi/models/operations/SDKMethodInterfaces.java + - 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/Errors.java + - src/main/java/com/styra/opa/openapi/models/shared/Explain.java + - src/main/java/com/styra/opa/openapi/models/shared/GzipAcceptEncoding.java + - src/main/java/com/styra/opa/openapi/models/shared/GzipContentEncoding.java + - src/main/java/com/styra/opa/openapi/models/shared/HealthyServer.java + - src/main/java/com/styra/opa/openapi/models/shared/Input.java + - src/main/java/com/styra/opa/openapi/models/shared/Location.java + - src/main/java/com/styra/opa/openapi/models/shared/Provenance.java + - src/main/java/com/styra/opa/openapi/models/shared/Responses.java + - src/main/java/com/styra/opa/openapi/models/shared/Result.java + - src/main/java/com/styra/opa/openapi/models/shared/Revision.java + - src/main/java/com/styra/opa/openapi/models/shared/Security.java + - src/main/java/com/styra/opa/openapi/models/shared/ServerErrorWithStatusCode.java + - src/main/java/com/styra/opa/openapi/models/shared/SuccessfulPolicyResponse.java + - src/main/java/com/styra/opa/openapi/models/shared/SuccessfulPolicyResponseWithStatusCode.java - src/main/java/com/styra/opa/openapi/utils/BackoffStrategy.java - src/main/java/com/styra/opa/openapi/utils/BigDecimalString.java - src/main/java/com/styra/opa/openapi/utils/BigIntegerString.java @@ -75,82 +154,65 @@ generatedFiles: - src/main/java/com/styra/opa/openapi/utils/TypedObject.java - src/main/java/com/styra/opa/openapi/utils/Types.java - src/main/java/com/styra/opa/openapi/utils/Utils.java - - src/main/java/com/styra/opa/openapi/models/errors/AuthException.java - - src/main/java/com/styra/opa/openapi/models/errors/SDKError.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputRequest.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteDefaultPolicyWithInputResponse.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyResponse.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequestBody.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputResponse.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequestBody.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java - - src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputResponse.java - - src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java - - src/main/java/com/styra/opa/openapi/models/operations/HealthResponse.java - - src/main/java/com/styra/opa/openapi/models/shared/Result.java - - src/main/java/com/styra/opa/openapi/models/shared/Input.java - - src/main/java/com/styra/opa/openapi/models/shared/GzipAcceptEncoding.java - - src/main/java/com/styra/opa/openapi/models/shared/SuccessfulPolicyResponse.java - - src/main/java/com/styra/opa/openapi/models/shared/Revision.java - - src/main/java/com/styra/opa/openapi/models/shared/Provenance.java - - src/main/java/com/styra/opa/openapi/models/shared/Explain.java - - src/main/java/com/styra/opa/openapi/models/shared/GzipContentEncoding.java - - src/main/java/com/styra/opa/openapi/models/shared/Location.java - - src/main/java/com/styra/opa/openapi/models/shared/Errors.java - - src/main/java/com/styra/opa/openapi/models/shared/ServerErrorWithStatusCode.java - - src/main/java/com/styra/opa/openapi/models/shared/SuccessfulPolicyResponseWithStatusCode.java - - src/main/java/com/styra/opa/openapi/models/shared/Responses.java - - 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 - - src/main/java/com/styra/opa/openapi/models/errors/ServerErrorLocation.java - - src/main/java/com/styra/opa/openapi/models/errors/ServerErrorErrors.java - - src/main/java/com/styra/opa/openapi/models/errors/ServerError.java - - src/main/java/com/styra/opa/openapi/models/errors/BatchServerError.java - - src/main/java/com/styra/opa/openapi/models/errors/UnhealthyServer.java - - docs/models/operations/ExecuteDefaultPolicyWithInputRequest.md - - docs/models/operations/ExecuteDefaultPolicyWithInputResponse.md - - docs/models/operations/ExecutePolicyRequest.md - - docs/models/operations/ExecutePolicyResponse.md - - docs/models/operations/ExecutePolicyWithInputRequestBody.md - - docs/models/operations/ExecutePolicyWithInputRequest.md - - docs/models/operations/ExecutePolicyWithInputResponse.md - - docs/models/operations/ExecuteBatchPolicyWithInputRequestBody.md - - docs/models/operations/ExecuteBatchPolicyWithInputRequest.md - - docs/models/operations/ExecuteBatchPolicyWithInputResponse.md - - docs/models/operations/HealthRequest.md - - docs/models/operations/HealthResponse.md - - docs/models/shared/Result.md - - docs/models/shared/Input.md - - docs/models/shared/GzipAcceptEncoding.md - - docs/models/shared/SuccessfulPolicyResponse.md - - docs/models/shared/Revision.md - - docs/models/shared/Provenance.md - - docs/models/shared/Explain.md - - docs/models/shared/GzipContentEncoding.md - - docs/models/shared/Location.md - - docs/models/shared/Errors.md - - docs/models/shared/ServerErrorWithStatusCode.md - - docs/models/shared/SuccessfulPolicyResponseWithStatusCode.md - - docs/models/shared/Responses.md - - 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 - - docs/models/errors/ServerErrorLocation.md - - docs/models/errors/ServerErrorErrors.md - - docs/models/errors/ServerError.md - - docs/models/errors/BatchServerError.md - - docs/models/errors/UnhealthyServer.md - - docs/sdks/opaapiclient/README.md - - USAGE.md - - CONTRIBUTING.md +examples: + executeDefaultPolicyWithInput: + speakeasy-default-execute-default-policy-with-input: + requestBody: + application/json: "8203.11" + responses: + "200": + application/json: "4113.99" + "400": + application/json: {"code": "", "message": ""} + "500": + application/json: {"code": "", "message": "", "decision_id": "b84cf736-213c-4932-a8e4-bb5c648f1b4d"} + executePolicy: + speakeasy-default-execute-policy: + parameters: + path: + path: "app/rbac" + query: {} + header: {} + responses: + "200": + application/json: {"result": true} + "400": + application/json: {"code": "", "message": ""} + "500": + application/json: {"code": "", "message": "", "decision_id": "b84cf736-213c-4932-a8e4-bb5c648f1b4d"} + executePolicyWithInput: + speakeasy-default-execute-policy-with-input: + parameters: + path: + path: "app/rbac" + query: {} + header: {} + requestBody: + application/json: {"input": false} + responses: + "200": + application/json: {"result": ""} + "400": + application/json: {"code": "", "message": ""} + "500": + application/json: {"code": "", "message": "", "decision_id": "b84cf736-213c-4932-a8e4-bb5c648f1b4d"} + executeBatchPolicyWithInput: + speakeasy-default-execute-batch-policy-with-input: + parameters: + path: + path: "app/rbac" + query: {} + header: {} + requestBody: + application/json: {"inputs": {"key": []}} + responses: + "200": + application/json: {"batch_decision_id": "1bef6b7d-cd13-4890-bfe1-fd2e8de32189", "responses": {"key": {"result": {"allow": true, "user_is_admin": true, "user_is_granted": []}}, "key1": {"result": []}}} + "207": + application/json: {"responses": {"key": {"http_status_code": "200", "result": ""}}} + "400": + application/json: {"code": "", "message": ""} + "500": + application/json: {"responses": {}} + health: + speakeasy-default-health: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f15f3f9..243c98c 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false java: - version: 1.7.0 + version: 1.7.1 additionalDependencies: - testImplementation:org.junit.jupiter:junit-jupiter-api:5.8.2 - runtimeOnly:org.junit.jupiter:junit-jupiter-engine:5.8.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d161d63..bc4f6e6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,18 @@ -speakeasyVersion: 1.376.0 +speakeasyVersion: 1.396.9 sources: openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:1ee32a806cc62fb2ea0359d3e3bd0a7bfd85e739abe15af4c81944953da8a4a2 - sourceBlobDigest: sha256:ba34b5e8162fb661727f5fc9878a8a8862a31609f96a6d73abf9d2c12076d872 + sourceRevisionDigest: sha256:89b83eaab457a2ec77f662a88b35e45c6f4f67507c2daf85e486a9dfb847ec1e + sourceBlobDigest: sha256:f76f9d1e8be466eef2d0e9612845ce19f9a5f507682e92d7a4355b3b13eaa921 tags: - latest + - main targets: opa: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:1ee32a806cc62fb2ea0359d3e3bd0a7bfd85e739abe15af4c81944953da8a4a2 - sourceBlobDigest: sha256:ba34b5e8162fb661727f5fc9878a8a8862a31609f96a6d73abf9d2c12076d872 - outLocation: /Users/cad/f/src/opa-java + sourceRevisionDigest: sha256:89b83eaab457a2ec77f662a88b35e45c6f4f67507c2daf85e486a9dfb847ec1e + sourceBlobDigest: sha256:f76f9d1e8be466eef2d0e9612845ce19f9a5f507682e92d7a4355b3b13eaa921 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 1f985e4..2299f9d 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,23 @@ public class App { # OPA OpenApi SDK (low-level) + +## Summary + +For more information about the API: [Enterprise OPA documentation](https://docs.styra.com/enterprise-opa) + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [Error Handling](#error-handling) +* [Server Selection](#server-selection) +* [Authentication](#authentication) + + ## SDK Example Usage @@ -162,8 +179,8 @@ public class Application { ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecutePolicyWithInputRequestBody.builder() - .input(Input.of(false)) - .build()) + .input(Input.of(false)) + .build()) .build(); ExecutePolicyWithInputResponse res = sdk.executePolicyWithInput() @@ -219,9 +236,9 @@ public class Application { ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecuteBatchPolicyWithInputRequestBody.builder() - .inputs(Map.ofEntries( - Map.entry("key", Input.of("")))) - .build()) + .inputs(Map.ofEntries( + Map.entry("key", Input.of("")))) + .build()) .build(); ExecuteBatchPolicyWithInputResponse res = sdk.executeBatchPolicyWithInput() @@ -253,6 +270,9 @@ public class Application { ## Available Resources and Operations +
+Available methods + ### [OpaApiClient SDK](docs/sdks/opaapiclient/README.md) * [executeDefaultPolicyWithInput](docs/sdks/opaapiclient/README.md#executedefaultpolicywithinput) - Execute the default decision given an input @@ -260,6 +280,8 @@ public class Application { * [executePolicyWithInput](docs/sdks/opaapiclient/README.md#executepolicywithinput) - Execute a policy given an input * [executeBatchPolicyWithInput](docs/sdks/opaapiclient/README.md#executebatchpolicywithinput) - Execute a policy given a batch of inputs * [health](docs/sdks/opaapiclient/README.md#health) - Verify the server is operational + +
diff --git a/RELEASES.md b/RELEASES.md index 6e5b56b..d5b2eaa 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -348,3 +348,14 @@ Based on: - [java v1.7.0] . ### Releases - [Maven Central v1.7.0] https://central.sonatype.com/artifact/com.styra.opa/openapi/1.7.0 - . + + +## 2024-09-14 00:22:23 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.7.1] . +### Releases +- [Maven Central v1.7.1] https://central.sonatype.com/artifact/com.styra.opa/openapi/1.7.1 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 0bd6317..4305bcb 100644 --- a/USAGE.md +++ b/USAGE.md @@ -72,8 +72,8 @@ public class Application { ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecutePolicyWithInputRequestBody.builder() - .input(Input.of(false)) - .build()) + .input(Input.of(false)) + .build()) .build(); ExecutePolicyWithInputResponse res = sdk.executePolicyWithInput() @@ -127,9 +127,9 @@ public class Application { ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecuteBatchPolicyWithInputRequestBody.builder() - .inputs(Map.ofEntries( - Map.entry("key", Input.of("")))) - .build()) + .inputs(Map.ofEntries( + Map.entry("key", Input.of("")))) + .build()) .build(); ExecuteBatchPolicyWithInputResponse res = sdk.executeBatchPolicyWithInput() diff --git a/build.gradle b/build.gradle index 7a9ed69..b9d1a20 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,6 @@ plugins { id 'signing' id("java") id("checkstyle") - id "nebula.lint" version "17.8.0" } compileJava.options.encoding = "UTF-8" @@ -44,7 +43,7 @@ model { jar { dependsOn(":generatePomFileForMavenPublication") - into("META-INF/maven/com.styra/opa") { + into("META-INF/maven/com.styra.opa/openapi") { from("$buildDir/pom.xml") } } @@ -63,15 +62,15 @@ tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } -group = "com.styra" -version = "1.7.0" +group = "com.styra.opa" +version = "1.7.1" sourcesJar { - archiveBaseName = "opa" + archiveBaseName = "openapi" } javadocJar { - archiveBaseName = "opa" + archiveBaseName = "openapi" } @@ -89,9 +88,9 @@ publishing { publications { maven(MavenPublication) { - groupId = 'com.styra' - artifactId = 'opa' - version = '1.7.0' + groupId = 'com.styra.opa' + artifactId = 'openapi' + version = '1.7.1' from components.java diff --git a/docs/sdks/opaapiclient/README.md b/docs/sdks/opaapiclient/README.md index 69c6115..0ec5584 100644 --- a/docs/sdks/opaapiclient/README.md +++ b/docs/sdks/opaapiclient/README.md @@ -1,10 +1,10 @@ # OpaApiClient SDK - ## Overview Enterprise OPA documentation + ### Available Operations * [executeDefaultPolicyWithInput](#executedefaultpolicywithinput) - Execute the default decision given an input @@ -67,8 +67,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -77,10 +75,10 @@ public class Application { | `acceptEncoding` | [Optional](../../models/shared/GzipAcceptEncoding.md) | :heavy_minus_sign: | Indicates the server should respond with a gzip encoded body. The server will send the compressed response only if its length is above `server.encoding.gzip.min_length` value. See the configuration section | | `input` | [Input](../../models/shared/Input.md) | :heavy_check_mark: | The input document | - ### Response **[ExecuteDefaultPolicyWithInputResponse](../../models/operations/ExecuteDefaultPolicyWithInputResponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -89,6 +87,7 @@ public class Application { | models/errors/ServerError | 500 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## executePolicy Execute a policy @@ -144,18 +143,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `request` | [ExecutePolicyRequest](../../models/operations/ExecutePolicyRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[ExecutePolicyResponse](../../models/operations/ExecutePolicyResponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -164,6 +161,7 @@ public class Application { | models/errors/ServerError | 500 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## executePolicyWithInput Execute a policy given an input @@ -195,8 +193,8 @@ public class Application { ExecutePolicyWithInputRequest req = ExecutePolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecutePolicyWithInputRequestBody.builder() - .input(Input.of(false)) - .build()) + .input(Input.of(false)) + .build()) .build(); ExecutePolicyWithInputResponse res = sdk.executePolicyWithInput() @@ -224,18 +222,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `request` | [ExecutePolicyWithInputRequest](../../models/operations/ExecutePolicyWithInputRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[ExecutePolicyWithInputResponse](../../models/operations/ExecutePolicyWithInputResponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -244,6 +240,7 @@ public class Application { | models/errors/ServerError | 500 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## executeBatchPolicyWithInput Execute a policy given a batch of inputs @@ -276,9 +273,9 @@ public class Application { ExecuteBatchPolicyWithInputRequest req = ExecuteBatchPolicyWithInputRequest.builder() .path("app/rbac") .requestBody(ExecuteBatchPolicyWithInputRequestBody.builder() - .inputs(Map.ofEntries( - Map.entry("key", Input.of("")))) - .build()) + .inputs(Map.ofEntries( + Map.entry("key", Input.of("")))) + .build()) .build(); ExecuteBatchPolicyWithInputResponse res = sdk.executeBatchPolicyWithInput() @@ -306,18 +303,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `request` | [ExecuteBatchPolicyWithInputRequest](../../models/operations/ExecuteBatchPolicyWithInputRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[ExecuteBatchPolicyWithInputResponse](../../models/operations/ExecuteBatchPolicyWithInputResponse.md)** + ### Errors | Error Object | Status Code | Content Type | @@ -326,6 +321,7 @@ public class Application { | models/errors/BatchServerError | 500 | application/json | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## health The health API endpoint executes a simple built-in policy query to verify that the server is operational. Optionally it can account for bundle activation as well (useful for “ready” checks at startup). @@ -377,8 +373,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -387,10 +381,10 @@ public class Application { | `plugins` | *Optional* | :heavy_minus_sign: | Boolean parameter to account for plugin status in response. | | `excludePlugin` | List<*String*> | :heavy_minus_sign: | String parameter to exclude a plugin from status checks. Can be added multiple times. Does nothing if plugins is not true. This parameter is useful for special use cases where a plugin depends on the server being fully initialized before it can fully initialize itself. | - ### Response **[HealthResponse](../../models/operations/HealthResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..6689b85 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle index abf456c..12ff7d3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,4 +7,4 @@ * in the user manual at https://docs.gradle.org/7.5.1/userguide/multi_project_builds.html */ -rootProject.name = 'opa' +rootProject.name = 'openapi' diff --git a/src/main/java/com/styra/opa/openapi/SDKConfiguration.java b/src/main/java/com/styra/opa/openapi/SDKConfiguration.java index af23035..9c8e025 100644 --- a/src/main/java/com/styra/opa/openapi/SDKConfiguration.java +++ b/src/main/java/com/styra/opa/openapi/SDKConfiguration.java @@ -23,9 +23,9 @@ public Optional securitySource() { public int serverIdx = 0; public String language = "java"; public String openapiDocVersion = "0.2.0"; - public String sdkVersion = "1.7.0"; - public String genVersion = "2.402.5"; - public String userAgent = "speakeasy-sdk/java 1.7.0 2.402.5 0.2.0 com.styra.opa.openapi"; + public String sdkVersion = "1.7.1"; + public String genVersion = "2.415.7"; + public String userAgent = "speakeasy-sdk/java 1.7.1 2.415.7 0.2.0 com.styra.opa.openapi"; private Hooks _hooks = createHooks(); diff --git a/src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java b/src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java index 5843ad1..dd1241c 100644 --- a/src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java +++ b/src/main/java/com/styra/opa/openapi/models/operations/ExecuteBatchPolicyWithInputRequest.java @@ -616,8 +616,7 @@ public Builder requestBody(ExecuteBatchPolicyWithInputRequestBody requestBody) { public ExecuteBatchPolicyWithInputRequest build() { if (path == null) { path = _SINGLETON_VALUE_Path.value(); - } - return new ExecuteBatchPolicyWithInputRequest( + } return new ExecuteBatchPolicyWithInputRequest( path, contentEncoding, acceptEncoding, diff --git a/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java b/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java index 2dc4ca7..2932ed2 100644 --- a/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java +++ b/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyRequest.java @@ -515,8 +515,7 @@ public Builder strictBuiltinErrors(Optional strictBuiltinErrors) { public ExecutePolicyRequest build() { if (path == null) { path = _SINGLETON_VALUE_Path.value(); - } - return new ExecutePolicyRequest( + } return new ExecutePolicyRequest( path, acceptEncoding, pretty, diff --git a/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java b/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java index 0aa0f53..b84140c 100644 --- a/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java +++ b/src/main/java/com/styra/opa/openapi/models/operations/ExecutePolicyWithInputRequest.java @@ -616,8 +616,7 @@ public Builder requestBody(ExecutePolicyWithInputRequestBody requestBody) { public ExecutePolicyWithInputRequest build() { if (path == null) { path = _SINGLETON_VALUE_Path.value(); - } - return new ExecutePolicyWithInputRequest( + } return new ExecutePolicyWithInputRequest( path, contentEncoding, acceptEncoding, diff --git a/src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java b/src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java index 7fd9c4d..9e43ea3 100644 --- a/src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java +++ b/src/main/java/com/styra/opa/openapi/models/operations/HealthRequest.java @@ -243,8 +243,7 @@ public HealthRequest build() { } if (plugins == null) { plugins = _SINGLETON_VALUE_Plugins.value(); - } - return new HealthRequest( + } return new HealthRequest( bundles, plugins, excludePlugin); diff --git a/src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java b/src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java index b7d8784..b16dd4a 100644 --- a/src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java +++ b/src/main/java/com/styra/opa/openapi/models/operations/HealthRequestBuilder.java @@ -72,7 +72,6 @@ public HealthResponse call() throws Exception { if (plugins == null) { plugins = _SINGLETON_VALUE_Plugins.value(); } - return sdk.health( bundles, plugins,