Skip to content

Commit 2363583

Browse files
committed
add in api key header, removing generated date as it causes commit noise
1 parent 9166019 commit 2363583

File tree

137 files changed

+159
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+159
-138
lines changed

client/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
fastcomments
44
- API version: 0.0.0
5-
- Build date: 2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]
65
- Generator version: 7.11.0
76

87
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -315,7 +314,14 @@ Class | Method | HTTP request | Description
315314
<a id="documentation-for-authorization"></a>
316315
## Documentation for Authorization
317316

318-
Endpoints do not require authorization.
317+
318+
Authentication schemes defined for the API:
319+
<a id="api_key"></a>
320+
### api_key
321+
322+
- **Type**: API key
323+
- **API key parameter name**: x-api-key
324+
- **Location**: HTTP header
319325

320326

321327
## Recommendation

client/api/openapi.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,8 @@ paths:
24152415
schema:
24162416
$ref: '#/components/schemas/AggregationResponse'
24172417
description: Ok
2418-
security: []
2418+
security:
2419+
- api_key: []
24192420
x-content-type: application/json
24202421
x-accepts:
24212422
- application/json
@@ -6831,5 +6832,9 @@ components:
68316832
- dir
68326833
- field
68336834
type: object
6834-
securitySchemes: {}
6835+
securitySchemes:
6836+
api_key:
6837+
in: header
6838+
name: x-api-key
6839+
type: apiKey
68356840

client/docs/DefaultApi.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,20 @@ Aggregates documents by grouping them (if groupBy is provided) and applying mult
104104
import com.fastcomments.invoker.ApiClient;
105105
import com.fastcomments.invoker.ApiException;
106106
import com.fastcomments.invoker.Configuration;
107+
import com.fastcomments.invoker.auth.*;
107108
import com.fastcomments.invoker.models.*;
108109
import com.fastcomments.api.DefaultApi;
109110

110111
public class Example {
111112
public static void main(String[] args) {
112113
ApiClient defaultClient = Configuration.getDefaultApiClient();
113114
defaultClient.setBasePath("http://localhost");
115+
116+
// Configure API key authorization: api_key
117+
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
118+
api_key.setApiKey("YOUR API KEY");
119+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
120+
//api_key.setApiKeyPrefix("Token");
114121

115122
DefaultApi apiInstance = new DefaultApi(defaultClient);
116123
String tenantId = "tenantId_example"; // String |
@@ -149,7 +156,7 @@ public class Example {
149156

150157
### Authorization
151158

152-
No authorization required
159+
[api_key](../README.md#api_key)
153160

154161
### HTTP request headers
155162

client/src/main/java/com/fastcomments/api/DefaultApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private okhttp3.Call aggregateCall(String tenantId, AggregationRequest aggregati
320320
localVarHeaderParams.put("Content-Type", localVarContentType);
321321
}
322322

323-
String[] localVarAuthNames = new String[] { };
323+
String[] localVarAuthNames = new String[] { "api_key" };
324324
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
325325
}
326326

client/src/main/java/com/fastcomments/invoker/ApiClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public ApiClient() {
100100
initHttpClient();
101101

102102
// Setup authentications (key: authentication name, value: authentication).
103+
authentications.put("api_key", new ApiKeyAuth("header", "x-api-key"));
103104
// Prevent the authentications from being modified.
104105
authentications = Collections.unmodifiableMap(authentications);
105106
}
@@ -115,6 +116,7 @@ public ApiClient(OkHttpClient client) {
115116
httpClient = client;
116117

117118
// Setup authentications (key: authentication name, value: authentication).
119+
authentications.put("api_key", new ApiKeyAuth("header", "x-api-key"));
118120
// Prevent the authentications from being modified.
119121
authentications = Collections.unmodifiableMap(authentications);
120122
}

client/src/main/java/com/fastcomments/invoker/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>ApiException class.</p>
2222
*/
2323
@SuppressWarnings("serial")
24-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]", comments = "Generator version: 7.11.0")
24+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0")
2525
public class ApiException extends Exception {
2626
private static final long serialVersionUID = 1L;
2727

client/src/main/java/com/fastcomments/invoker/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.fastcomments.invoker;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]", comments = "Generator version: 7.11.0")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0")
1717
public class Configuration {
1818
public static final String VERSION = "0.0.1";
1919

client/src/main/java/com/fastcomments/invoker/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.fastcomments.invoker;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]", comments = "Generator version: 7.11.0")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0")
1717
public class Pair {
1818
private String name = "";
1919
private String value = "";

client/src/main/java/com/fastcomments/invoker/ServerConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Representing a Server configuration.
2020
*/
21-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]", comments = "Generator version: 7.11.0")
21+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0")
2222
public class ServerConfiguration {
2323
public String URL;
2424
public String description;

client/src/main/java/com/fastcomments/invoker/ServerVariable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Representing a Server Variable for server URL template substitution.
2020
*/
21-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-03-26T17:06:48.661467821-07:00[America/Los_Angeles]", comments = "Generator version: 7.11.0")
21+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0")
2222
public class ServerVariable {
2323
public String description;
2424
public String defaultValue;

0 commit comments

Comments
 (0)