From 2e279b4263beebd44065cc1564d14f9e2fcdd844 Mon Sep 17 00:00:00 2001 From: winrid Date: Wed, 29 Oct 2025 10:50:52 -0700 Subject: [PATCH] Fixing API Key Configuration For Pages, Subscriptions, SSO Users --- README.md | 74 +++++++++- client/README.md | 6 +- client/api/openapi.yaml | 45 ++++-- client/build.gradle | 2 +- client/build.sbt | 2 +- client/docs/DefaultApi.md | 135 ++++++++++++++++-- client/pom.xml | 2 +- .../java/com/fastcomments/api/DefaultApi.java | 30 ++-- .../com/fastcomments/invoker/ApiClient.java | 2 +- .../fastcomments/invoker/Configuration.java | 2 +- config.json | 2 +- 11 files changed, 246 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index e119577..c352e09 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,78 @@ to make working with the API easier, and the `pubsub` module which is a library ### Public vs Secured APIs -For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that take your API key, and `PublicApi` contains api calls -that can be made directly from a browser/mobile device/etc. +For the API client, there are two classes, `DefaultApi` and `PublicApi`. The `DefaultApi` contains methods that require your API key, and `PublicApi` contains api calls +that can be made directly from a browser/mobile device/etc without authentication. + +## Quick Start + +### Using Authenticated APIs (DefaultApi) + +**Important:** You must set your API key on the ApiClient before making authenticated requests. If you don't, requests will fail with a 401 error. + +```java +import com.fastcomments.invoker.ApiClient; +import com.fastcomments.invoker.ApiException; +import com.fastcomments.api.DefaultApi; +import com.fastcomments.model.*; + +public class Example { + public static void main(String[] args) { + // Create and configure the API client + ApiClient apiClient = new ApiClient(); + + // REQUIRED: Set your API key (get this from your FastComments dashboard) + apiClient.setApiKey("YOUR_API_KEY_HERE"); + + // Create the API instance with the configured client + DefaultApi api = new DefaultApi(apiClient); + + // Now you can make authenticated API calls + try { + // Example: Add an SSO user + CreateAPISSOUserData userData = new CreateAPISSOUserData(); + userData.setId("user-123"); + userData.setEmail("user@example.com"); + userData.setDisplayName("John Doe"); + + AddSSOUserAPIResponse response = api.addSSOUser("YOUR_TENANT_ID", userData) + .execute(); + System.out.println("User created: " + response); + + } catch (ApiException e) { + System.err.println("Error: " + e.getResponseBody()); + // Common errors: + // - 401: API key is missing or invalid + // - 400: Request validation failed + } + } +} +``` + +### Using Public APIs (PublicApi) + +Public endpoints don't require authentication: + +```java +import com.fastcomments.api.PublicApi; +import com.fastcomments.invoker.ApiException; + +PublicApi publicApi = new PublicApi(); + +try { + var response = publicApi.getCommentsPublic("YOUR_TENANT_ID", "page-url-id") + .execute(); + System.out.println(response); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +### Common Issues + +1. **401 "missing-api-key" error**: Make sure you call `apiClient.setApiKey("YOUR_KEY")` before creating the DefaultApi instance. +2. **Wrong API class**: Use `DefaultApi` for server-side authenticated requests, `PublicApi` for client-side/public requests. +3. **Null API key**: The SDK will silently skip authentication if the API key is null, leading to 401 errors. ## Notes diff --git a/client/README.md b/client/README.md index c2a456b..a293c68 100644 --- a/client/README.md +++ b/client/README.md @@ -40,7 +40,7 @@ Add this dependency to your project's POM: com.fastcomments client - 0.0.25 + 0.0.26 compile ``` @@ -56,7 +56,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.fastcomments:client:0.0.25" + implementation "com.fastcomments:client:0.0.26" } ``` @@ -70,7 +70,7 @@ mvn clean package Then manually install the following JARs: -* `target/client-0.0.25.jar` +* `target/client-0.0.26.jar` * `target/lib/*.jar` ## Getting Started diff --git a/client/api/openapi.yaml b/client/api/openapi.yaml index e2adee3..9d59786 100644 --- a/client/api/openapi.yaml +++ b/client/api/openapi.yaml @@ -1998,7 +1998,8 @@ paths: schema: $ref: '#/components/schemas/GetSubscriptionsAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json post: @@ -2024,7 +2025,8 @@ paths: schema: $ref: '#/components/schemas/CreateSubscriptionAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json @@ -2060,7 +2062,8 @@ paths: schema: $ref: '#/components/schemas/DeleteSubscriptionAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json /api/v1/sso-users: @@ -2089,7 +2092,8 @@ paths: schema: $ref: '#/components/schemas/GetSSOUsers_200_response' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json post: @@ -2115,7 +2119,8 @@ paths: schema: $ref: '#/components/schemas/AddSSOUserAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json @@ -2144,7 +2149,8 @@ paths: schema: $ref: '#/components/schemas/GetSSOUserByIdAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json /api/v1/sso-users/by-email/{email}: @@ -2172,7 +2178,8 @@ paths: schema: $ref: '#/components/schemas/GetSSOUserByEmailAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json /api/v1/sso-users/{id}: @@ -2214,7 +2221,8 @@ paths: schema: $ref: '#/components/schemas/DeleteSSOUserAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json patch: @@ -2254,7 +2262,8 @@ paths: schema: $ref: '#/components/schemas/PatchSSOUserAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json @@ -2295,7 +2304,8 @@ paths: schema: $ref: '#/components/schemas/PutSSOUserAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json @@ -2317,7 +2327,8 @@ paths: schema: $ref: '#/components/schemas/GetPagesAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json post: @@ -2343,7 +2354,8 @@ paths: schema: $ref: '#/components/schemas/AddPageAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json @@ -2372,7 +2384,8 @@ paths: schema: $ref: '#/components/schemas/GetPageByURLIdAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json /api/v1/pages/{id}: @@ -2400,7 +2413,8 @@ paths: schema: $ref: '#/components/schemas/DeletePageAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-accepts: - application/json patch: @@ -2433,7 +2447,8 @@ paths: schema: $ref: '#/components/schemas/PatchPageAPIResponse' description: Ok - security: [] + security: + - api_key: [] x-content-type: application/json x-accepts: - application/json diff --git a/client/build.gradle b/client/build.gradle index 4e2a03f..159231d 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.fastcomments' -version = '0.0.25' +version = '0.0.26' buildscript { repositories { diff --git a/client/build.sbt b/client/build.sbt index fe0280a..4c4525b 100644 --- a/client/build.sbt +++ b/client/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.fastcomments", name := "client", - version := "0.0.25", + version := "0.0.26", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/client/docs/DefaultApi.md b/client/docs/DefaultApi.md index f36e5ce..804608d 100644 --- a/client/docs/DefaultApi.md +++ b/client/docs/DefaultApi.md @@ -136,6 +136,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -143,6 +144,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -175,7 +182,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -199,6 +206,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -206,6 +214,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -238,7 +252,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -751,6 +765,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -758,6 +773,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -790,7 +811,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1030,6 +1051,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1037,6 +1059,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -1069,7 +1097,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1093,6 +1121,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1100,6 +1129,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -1138,7 +1173,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1162,6 +1197,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1169,6 +1205,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -1204,7 +1246,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1854,6 +1896,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1861,6 +1904,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -1893,7 +1942,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1917,6 +1966,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1924,6 +1974,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -1954,7 +2010,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -1978,6 +2034,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -1985,6 +2042,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2017,7 +2080,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2041,6 +2104,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2048,6 +2112,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2080,7 +2150,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2104,6 +2174,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2111,6 +2182,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2144,7 +2221,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2168,6 +2245,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2175,6 +2253,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2208,7 +2292,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2677,6 +2761,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2684,6 +2769,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2718,7 +2809,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2742,6 +2833,7 @@ No authorization required import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2749,6 +2841,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2786,7 +2884,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -2882,6 +2980,7 @@ public class Example { import com.fastcomments.invoker.ApiClient; import com.fastcomments.invoker.ApiException; import com.fastcomments.invoker.Configuration; +import com.fastcomments.invoker.auth.*; import com.fastcomments.invoker.models.*; import com.fastcomments.api.DefaultApi; @@ -2889,6 +2988,12 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://fastcomments.com"); + + // Configure API key authorization: api_key + ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); + api_key.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //api_key.setApiKeyPrefix("Token"); DefaultApi apiInstance = new DefaultApi(defaultClient); String tenantId = "tenantId_example"; // String | @@ -2926,7 +3031,7 @@ public class Example { ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers diff --git a/client/pom.xml b/client/pom.xml index 2c34209..a1547aa 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -5,7 +5,7 @@ client jar client - 0.0.25 + 0.0.26 https://fastcomments.com FastComments API Client - A SDK for interacting with the FastComments API diff --git a/client/src/main/java/com/fastcomments/api/DefaultApi.java b/client/src/main/java/com/fastcomments/api/DefaultApi.java index ee89971..e468c05 100644 --- a/client/src/main/java/com/fastcomments/api/DefaultApi.java +++ b/client/src/main/java/com/fastcomments/api/DefaultApi.java @@ -347,7 +347,7 @@ private okhttp3.Call addPageCall(String tenantId, CreateAPIPageData createAPIPag localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -516,7 +516,7 @@ private okhttp3.Call addSSOUserCall(String tenantId, CreateAPISSOUserData create localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2035,7 +2035,7 @@ private okhttp3.Call createSubscriptionCall(String tenantId, CreateAPIUserSubscr localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2741,7 +2741,7 @@ private okhttp3.Call deletePageCall(String tenantId, String id, final ApiCallbac localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -2918,7 +2918,7 @@ private okhttp3.Call deleteSSOUserCall(String tenantId, String id, Boolean delet localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -3113,7 +3113,7 @@ private okhttp3.Call deleteSubscriptionCall(String tenantId, String id, String u localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -4972,7 +4972,7 @@ private okhttp3.Call getPageByURLIdCall(String tenantId, String urlId, final Api localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -5140,7 +5140,7 @@ private okhttp3.Call getPagesCall(String tenantId, final ApiCallback _callback) localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -5301,7 +5301,7 @@ private okhttp3.Call getSSOUserByEmailCall(String tenantId, String email, final localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -5470,7 +5470,7 @@ private okhttp3.Call getSSOUserByIdCall(String tenantId, String id, final ApiCal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -5642,7 +5642,7 @@ private okhttp3.Call getSSOUsersCall(String tenantId, Double skip, final ApiCall localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -5817,7 +5817,7 @@ private okhttp3.Call getSubscriptionsCall(String tenantId, String userId, final localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -7130,7 +7130,7 @@ private okhttp3.Call patchPageCall(String tenantId, String id, UpdateAPIPageData localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -7312,7 +7312,7 @@ private okhttp3.Call patchSSOUserCall(String tenantId, String id, UpdateAPISSOUs localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -7683,7 +7683,7 @@ private okhttp3.Call putSSOUserCall(String tenantId, String id, UpdateAPISSOUser localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "api_key" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } diff --git a/client/src/main/java/com/fastcomments/invoker/ApiClient.java b/client/src/main/java/com/fastcomments/invoker/ApiClient.java index f6df802..c951062 100644 --- a/client/src/main/java/com/fastcomments/invoker/ApiClient.java +++ b/client/src/main/java/com/fastcomments/invoker/ApiClient.java @@ -146,7 +146,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.0.25/java"); + setUserAgent("OpenAPI-Generator/0.0.26/java"); authentications = new HashMap(); } diff --git a/client/src/main/java/com/fastcomments/invoker/Configuration.java b/client/src/main/java/com/fastcomments/invoker/Configuration.java index ea4fdbc..cee2f3c 100644 --- a/client/src/main/java/com/fastcomments/invoker/Configuration.java +++ b/client/src/main/java/com/fastcomments/invoker/Configuration.java @@ -15,7 +15,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.11.0") public class Configuration { - public static final String VERSION = "0.0.25"; + public static final String VERSION = "0.0.26"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/config.json b/config.json index 9faed8c..8202e5e 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "groupId": "com.fastcomments", "artifactId": "client", - "artifactVersion": "0.0.25", + "artifactVersion": "0.0.26", "packageName": "com.fastcomments", "apiPackage": "com.fastcomments.api", "modelPackage": "com.fastcomments.model",