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

Restpkicore test homolog #2

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ gradlew.bat
out/
.idea/
docs/
gradle.properties
gradle.properties
gpg_key/lacuna_0xAD3DA507_SECRET.gpg
modules/swagger-codegen-cli/target/swagger-codegen-cli.jar
1 change: 1 addition & 0 deletions .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.33
2 changes: 1 addition & 1 deletion Generate-ApiCode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try {

Write-Host ">>> Generating code ..."

&java -jar $toolJarPath generate -i https://core.pki.rest/swagger/api/swagger.json -l java -c swagger-codegen-config.json -o $tempDir
&java -jar $toolJarPath generate -i https://homolog.core.pki.rest/swagger/api/swagger.json -l java -c swagger-codegen-config.json -o $tempDir

Write-Host ">>> Customizing classes ..."

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ targetCompatibility = 1.8

group = 'com.lacunasoftware.restpki'
archivesBaseName = 'restpkicore-client'
version = '1.0.0'
version = '1.0.1-beta-3.0.1'

repositories {
mavenCentral()
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rest PKI Core API
* <b><i>Para Português, <a href=\"https://docs.lacunasoftware.com/pt-br/articles/rest-pki/core/integration/get-started\">clique aqui</a></i></b> <p> <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/\">Rest PKI Core</a> is an upcoming version of <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/\">Rest PKI</a> that will have extended compatibility with environments and databases. </p> <p> In addition to Windows Server (which is already supported by Rest PKI), Rest PKI Core will also run on <b>Linux</b> (Debian- and RedHat-based distributions) and on <b>Docker</b>. As for database servers, in addition to SQL Server, <b>PostgreSQL</b> will also be supported. </p> <p> <b>Before getting started, see the integration overview on the <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/integration/\">Integration Guide</a></b> </p> <p> For questions regarding the usage of this API, please reach us at <a href=\"https://lacuna.help/\">lacuna.help</a> </p> <h2>Parameters</h2> <p> You will need the following parameters: </p> <ul> <li><b>Endpoint</b>: address of the Rest PKI Core instance that will be used</li> <li><b>API Key</b>: authorization key for using the API</li> </ul> <p> The <span class=\"model\">endpoint</span> must be prefixed to all relative URLs mentioned here. As for the <span class=\"model\">API Key</span>, see how to use it below. </p> <h2>Authentication</h2> <p> The API key must be sent on the <span class=\"model\">X-Api-Key</span> header on each request: </p> <!-- unfortunately, class \"example microlight\" doesn't seem to work here --> <pre style=\"font-size: 12px; padding: 10px; border-radius: 4px; background: #41444e; font-weight: 600; color: #fff;\"> X-Api-Key: yourapp|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre> <h2>HTTP Codes</h2> <p> The APIs will return the following HTTP codes: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong class=\"model-title\">200 (OK)</strong></td> <td>Request processed successfully. The response is different for each API, please refer to the operation's documentation</td> </tr> <tr> <td><strong class=\"model-title\">400 (Bad Request)</strong></td> <td>Syntax error. For instance, when a required field was not provided</td> </tr> <tr> <td><strong class=\"model-title\">401 (Unauthorized)</strong></td> <td>API key not provided or invalid</td> </tr> <tr> <td><strong class=\"model-title\">403 (Forbidden)</strong></td> <td>API key is valid, but the application has insufficient permissions to complete the requested operation</td> </tr> <tr> <td><strong class=\"model-title\">422 (Unprocessable Entity)</strong></td> <td>API error. The response body is an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> </tr> <tr> <td><strong class=\"model-title\">500 (Internal Server Error)</strong></td> <td>An unexpected error occurred. The <span class=\"model\">exceptionCode</span> contained on the response body may be of help for our support team during diagnostic.</td> </tr> </tbody> </table> <h3>Error Codes</h3> <p> Some of the error codes returned in the <span class=\"model\">code</span> field of an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> (body of responses with HTTP status code 422) are provided below*: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td class=\"model\">DocumentNotFound</td> <td>A referenced document was not found (check the document ID)</td> </tr> <tr> <td class=\"model\">SecurityContextNotFound</td> <td>A referenced security context was not found (check the security context ID)</td> </tr> <tr> <td class=\"model\">SignatureSessionNotFound</td> <td>A referenced signature session was not found (check the signature session ID)</td> </tr> <tr> <td class=\"model\">BadSignatureSessionOperation</td> <td>The operation is invalid for the current signature session or document status. For instance, trying to await the session's completion if it is still <span class=\"model\">Pending</span> results in this error</td> </tr> <tr> <td class=\"model\">BackgroundProcessing</td> <td>The operation cannot be completed at this time because the resource is being processed in background</td> </tr> <tr> <td class=\"model\">SignatureSessionTokenRequired</td> <td>The signature session token was not passed on the <span class=\"model\">X-Signature-Session-Token</span> request header</td> </tr> <tr> <td class=\"model\">BadSignatureSessionToken</td> <td>An invalid signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Check your application for possible corruption of the session token, which may contain characters <span class=\"code\">-</span> (hyphen) and <span class=\"code\">_</span> (underscore)</td> </tr> <tr> <td class=\"model\">ExpiredSignatureSessionToken</td> <td>An expired signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Signature session tokens are normally valid for 4 hours.</td> </tr> </tbody> </table> <p style=\"font-size: 0.9em\"> *The codes shown above are the most common error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning. </p> <h2>Culture / Internationalization (i18n)</h2> <p>The <span class=\"model\">Accept-Language</span> request header is observed by this API. The following cultures are supported:</p> <ul> <li><span class=\"code\">en-US</span> (or simply <span class=\"code\">en</span>)</li> <li><span class=\"code\">pt-BR</span> (or simply <span class=\"code\">pt</span>)</li> </ul> <p><i>Notice: error messages are not affected by this header and therefore should not be displayed to users, being better suited for logging.</i></p>
*
* OpenAPI spec version: 1.5.0 RTM
* OpenAPI spec version: 1.10.0 Beta 1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand All @@ -13,8 +13,10 @@
package com.lacunasoftware.restpkicore;

import java.util.Objects;

import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.HashMap;
import java.util.List;
Expand All @@ -23,8 +25,9 @@
* AllocateDocumentKeyBatchRequest
*/

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-10-06T21:56:19.611140200-03:00[America/Sao_Paulo]")
public class AllocateDocumentKeyBatchRequest {
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-13T10:50:43.275-03:00[America/Sao_Paulo]")
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
class AllocateDocumentKeyBatchRequest {
@JsonProperty("count")
private Integer count = null;

Expand Down Expand Up @@ -58,7 +61,7 @@ public AllocateDocumentKeyBatchRequest provisionalMetadata(Map<String, List<Stri

public AllocateDocumentKeyBatchRequest putProvisionalMetadataItem(String key, List<String> provisionalMetadataItem) {
if (this.provisionalMetadata == null) {
this.provisionalMetadata = new HashMap<String, List<String>>();
this.provisionalMetadata = new HashMap<>();
}
this.provisionalMetadata.put(key, provisionalMetadataItem);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Rest PKI Core API
* <b><i>Para Português, <a href=\"https://docs.lacunasoftware.com/pt-br/articles/rest-pki/core/integration/get-started\">clique aqui</a></i></b> <p> <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/\">Rest PKI Core</a> is an upcoming version of <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/\">Rest PKI</a> that will have extended compatibility with environments and databases. </p> <p> In addition to Windows Server (which is already supported by Rest PKI), Rest PKI Core will also run on <b>Linux</b> (Debian- and RedHat-based distributions) and on <b>Docker</b>. As for database servers, in addition to SQL Server, <b>PostgreSQL</b> will also be supported. </p> <p> <b>Before getting started, see the integration overview on the <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/integration/\">Integration Guide</a></b> </p> <p> For questions regarding the usage of this API, please reach us at <a href=\"https://lacuna.help/\">lacuna.help</a> </p> <h2>Parameters</h2> <p> You will need the following parameters: </p> <ul> <li><b>Endpoint</b>: address of the Rest PKI Core instance that will be used</li> <li><b>API Key</b>: authorization key for using the API</li> </ul> <p> The <span class=\"model\">endpoint</span> must be prefixed to all relative URLs mentioned here. As for the <span class=\"model\">API Key</span>, see how to use it below. </p> <h2>Authentication</h2> <p> The API key must be sent on the <span class=\"model\">X-Api-Key</span> header on each request: </p> <!-- unfortunately, class \"example microlight\" doesn't seem to work here --> <pre style=\"font-size: 12px; padding: 10px; border-radius: 4px; background: #41444e; font-weight: 600; color: #fff;\"> X-Api-Key: yourapp|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre> <h2>HTTP Codes</h2> <p> The APIs will return the following HTTP codes: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong class=\"model-title\">200 (OK)</strong></td> <td>Request processed successfully. The response is different for each API, please refer to the operation's documentation</td> </tr> <tr> <td><strong class=\"model-title\">400 (Bad Request)</strong></td> <td>Syntax error. For instance, when a required field was not provided</td> </tr> <tr> <td><strong class=\"model-title\">401 (Unauthorized)</strong></td> <td>API key not provided or invalid</td> </tr> <tr> <td><strong class=\"model-title\">403 (Forbidden)</strong></td> <td>API key is valid, but the application has insufficient permissions to complete the requested operation</td> </tr> <tr> <td><strong class=\"model-title\">422 (Unprocessable Entity)</strong></td> <td>API error. The response body is an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> </tr> <tr> <td><strong class=\"model-title\">500 (Internal Server Error)</strong></td> <td>An unexpected error occurred. The <span class=\"model\">exceptionCode</span> contained on the response body may be of help for our support team during diagnostic.</td> </tr> </tbody> </table> <h3>Error Codes</h3> <p> Some of the error codes returned in the <span class=\"model\">code</span> field of an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> (body of responses with HTTP status code 422) are provided below*: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td class=\"model\">DocumentNotFound</td> <td>A referenced document was not found (check the document ID)</td> </tr> <tr> <td class=\"model\">SecurityContextNotFound</td> <td>A referenced security context was not found (check the security context ID)</td> </tr> <tr> <td class=\"model\">SignatureSessionNotFound</td> <td>A referenced signature session was not found (check the signature session ID)</td> </tr> <tr> <td class=\"model\">BadSignatureSessionOperation</td> <td>The operation is invalid for the current signature session or document status. For instance, trying to await the session's completion if it is still <span class=\"model\">Pending</span> results in this error</td> </tr> <tr> <td class=\"model\">BackgroundProcessing</td> <td>The operation cannot be completed at this time because the resource is being processed in background</td> </tr> <tr> <td class=\"model\">SignatureSessionTokenRequired</td> <td>The signature session token was not passed on the <span class=\"model\">X-Signature-Session-Token</span> request header</td> </tr> <tr> <td class=\"model\">BadSignatureSessionToken</td> <td>An invalid signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Check your application for possible corruption of the session token, which may contain characters <span class=\"code\">-</span> (hyphen) and <span class=\"code\">_</span> (underscore)</td> </tr> <tr> <td class=\"model\">ExpiredSignatureSessionToken</td> <td>An expired signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Signature session tokens are normally valid for 4 hours.</td> </tr> </tbody> </table> <p style=\"font-size: 0.9em\"> *The codes shown above are the most common error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning. </p> <h2>Culture / Internationalization (i18n)</h2> <p>The <span class=\"model\">Accept-Language</span> request header is observed by this API. The following cultures are supported:</p> <ul> <li><span class=\"code\">en-US</span> (or simply <span class=\"code\">en</span>)</li> <li><span class=\"code\">pt-BR</span> (or simply <span class=\"code\">pt</span>)</li> </ul> <p><i>Notice: error messages are not affected by this header and therefore should not be displayed to users, being better suited for logging.</i></p>
*
* OpenAPI spec version: 1.5.0 RTM
* OpenAPI spec version: 1.10.0 Beta 1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand All @@ -13,8 +13,10 @@
package com.lacunasoftware.restpkicore;

import java.util.Objects;

import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.HashMap;
import java.util.List;
Expand All @@ -23,8 +25,9 @@
* AllocateDocumentKeyRequest
*/

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2021-10-06T21:56:19.611140200-03:00[America/Sao_Paulo]")
public class AllocateDocumentKeyRequest {
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-13T10:50:43.275-03:00[America/Sao_Paulo]")
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
class AllocateDocumentKeyRequest {
@JsonProperty("provisionalMetadata")
private Map<String, List<String>> provisionalMetadata = null;

Expand All @@ -35,7 +38,7 @@ public AllocateDocumentKeyRequest provisionalMetadata(Map<String, List<String>>

public AllocateDocumentKeyRequest putProvisionalMetadataItem(String key, List<String> provisionalMetadataItem) {
if (this.provisionalMetadata == null) {
this.provisionalMetadata = new HashMap<String, List<String>>();
this.provisionalMetadata = new HashMap<>();
}
this.provisionalMetadata.put(key, provisionalMetadataItem);
return this;
Expand Down
Loading