Skip to content

Commit

Permalink
update client
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Nov 4, 2024
1 parent 4b4cfe0 commit 2efdc4c
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-intelligence-service-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
push:
paths:
- 'server/intelligence-service/openapi.yaml'
- 'server/application-server/src/main/java/de/tum/in/www1/hephaestus/intelligenceapi/**'
- 'server/application-server/src/main/java/de/tum/in/www1/hephaestus/intelligenceservice/**'
branches: [develop]
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
],
"scripts": {
"generate:api:application-server:clean": "rimraf webapp/src/app/core/modules/openapi",
"generate:api:intelligence-service:clean": "rimraf server/application-server/src/main/java/de/tum/in/www1/hephaestus/intelligenceapi",
"generate:api:intelligence-service:clean": "rimraf server/application-server/src/main/java/de/tum/in/www1/hephaestus/intelligenceservice",
"generate:api:clean": "npm run generate:api:intelligence-service:clean && npm run generate:api:application-server:clean",

"generate:api:application-server-specs": "cd server/application-server && mvn verify -DskipTests=true -Dapp.profiles=specs",
"generate:api:intelligence-service-specs": "python -m server.intelligence-service.app.generate_openapi_yaml",
"generate:api:specs": "npm run generate:api:application-server-specs && npm run generate:api:intelligence-service-specs",

"generate:api:application-server-client": "npx openapi-generator-cli generate -i server/application-server/openapi.yaml -g typescript-angular -o webapp/src/app/core/modules/openapi --additional-properties fileNaming=kebab-case,withInterfaces=true --generate-alias-as-model",
"generate:api:intelligence-service-client": "npx openapi-generator-cli generate -i server/intelligence-service/openapi.yaml -g java --library resttemplate --api-package de.tum.in.www1.hephaestus.intelligenceapi.api --model-package de.tum.in.www1.hephaestus.intelligenceapi.model --invoker-package de.tum.in.www1.hephaestus.intelligenceapi --additional-properties useJakartaEe=true,performBeanValidation=true,generateClientAsBean=true --package-name de.tum.in.www1.hephaestus.intelligenceapi -o tmp/java-client && shx cp -r tmp/java-client/src/main/java/de/tum/in/www1/hephaestus/intelligenceapi server/application-server/src/main/java/de/tum/in/www1/hephaestus && rimraf tmp",
"generate:api:intelligence-service-client": "npx openapi-generator-cli generate -i server/intelligence-service/openapi.yaml -g java --library resttemplate --api-package de.tum.in.www1.hephaestus.intelligenceservice.api --model-package de.tum.in.www1.hephaestus.intelligenceservice.model --invoker-package de.tum.in.www1.hephaestus.intelligenceservice --additional-properties useJakartaEe=true,performBeanValidation=true,generateClientAsBean=true,hideGenerationTimestamp=true --package-name de.tum.in.www1.hephaestus.intelligenceservice -o tmp/java-client && shx cp -r tmp/java-client/src/main/java/de/tum/in/www1/hephaestus/intelligenceservice server/application-server/src/main/java/de/tum/in/www1/hephaestus && rimraf tmp",
"generate:api:clients": "npm run generate:api:intelligence-service-client && npm run generate:api:application-server-client",

"generate:api:application-server": "npm run generate:api:application-server-specs && npm run generate:api:application-server:clean && npm run generate:api:application-server-client",
Expand All @@ -23,6 +23,6 @@
"devDependencies": {
"@openapitools/openapi-generator-cli": "2.13.5",
"rimraf": "6.0.1",
"shx": "^0.3.4"
"shx": "0.3.4"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand Down Expand Up @@ -56,10 +56,10 @@
import java.util.function.Supplier;
import java.time.OffsetDateTime;

import de.tum.in.www1.hephaestus.intelligenceapi.auth.Authentication;
import de.tum.in.www1.hephaestus.intelligenceservice.auth.Authentication;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@Component("de.tum.in.www1.hephaestus.intelligenceapi.ApiClient")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
@Component("de.tum.in.www1.hephaestus.intelligenceservice.ApiClient")
public class ApiClient extends JavaTimeFormatter {
public enum CollectionFormat {
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import org.springframework.web.client.RestClientException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public abstract class BaseApi {

protected ApiClient apiClient;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Do not edit the class manually.
*/

package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
Expand All @@ -20,7 +20,7 @@
* Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class.
* It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class JavaTimeFormatter {

private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Do not edit the class manually.
*/

package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import com.fasterxml.jackson.databind.util.StdDateFormat;

Expand All @@ -22,7 +22,7 @@
import java.util.GregorianCalendar;
import java.util.TimeZone;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class RFC3339DateFormat extends DateFormat {
private static final long serialVersionUID = 1L;
private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import java.util.Map;

/**
* Representing a Server configuration.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ServerConfiguration {
public String URL;
public String description;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.tum.in.www1.hephaestus.intelligenceapi;
package de.tum.in.www1.hephaestus.intelligenceservice;

import java.util.HashSet;

/**
* Representing a Server Variable for server URL template substitution.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ServerVariable {
public String description;
public String defaultValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.tum.in.www1.hephaestus.intelligenceapi.api;
package de.tum.in.www1.hephaestus.intelligenceservice.api;

import de.tum.in.www1.hephaestus.intelligenceapi.ApiClient;
import de.tum.in.www1.hephaestus.intelligenceapi.BaseApi;
import de.tum.in.www1.hephaestus.intelligenceservice.ApiClient;
import de.tum.in.www1.hephaestus.intelligenceservice.BaseApi;

import de.tum.in.www1.hephaestus.intelligenceapi.model.ChatRequest;
import de.tum.in.www1.hephaestus.intelligenceapi.model.ChatResponse;
import de.tum.in.www1.hephaestus.intelligenceapi.model.HTTPValidationError;
import de.tum.in.www1.hephaestus.intelligenceservice.model.ChatRequest;
import de.tum.in.www1.hephaestus.intelligenceservice.model.ChatResponse;
import de.tum.in.www1.hephaestus.intelligenceservice.model.HTTPValidationError;

import java.util.Collections;
import java.util.HashMap;
Expand All @@ -28,8 +28,8 @@
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@Component("de.tum.in.www1.hephaestus.intelligenceapi.api.DefaultApi")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
@Component("de.tum.in.www1.hephaestus.intelligenceservice.api.DefaultApi")
public class DefaultApi extends BaseApi {

public DefaultApi() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package de.tum.in.www1.hephaestus.intelligenceapi.auth;
package de.tum.in.www1.hephaestus.intelligenceservice.auth;

import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.hephaestus.intelligenceapi.auth;
package de.tum.in.www1.hephaestus.intelligenceservice.auth;

import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package de.tum.in.www1.hephaestus.intelligenceapi.auth;
package de.tum.in.www1.hephaestus.intelligenceservice.auth;

import java.nio.charset.StandardCharsets;
import java.util.Base64;

import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class HttpBasicAuth implements Authentication {
private String username;
private String password;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package de.tum.in.www1.hephaestus.intelligenceapi.auth;
package de.tum.in.www1.hephaestus.intelligenceservice.auth;

import java.util.Optional;
import java.util.function.Supplier;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class HttpBearerAuth implements Authentication {
private final String scheme;
private Supplier<String> tokenSupplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


package de.tum.in.www1.hephaestus.intelligenceapi.model;
package de.tum.in.www1.hephaestus.intelligenceservice.model;

import java.util.Objects;
import java.util.Arrays;
Expand All @@ -30,7 +30,7 @@
@JsonPropertyOrder({
ChatRequest.JSON_PROPERTY_MESSAGE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ChatRequest {
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


package de.tum.in.www1.hephaestus.intelligenceapi.model;
package de.tum.in.www1.hephaestus.intelligenceservice.model;

import java.util.Objects;
import java.util.Arrays;
Expand All @@ -30,7 +30,7 @@
@JsonPropertyOrder({
ChatResponse.JSON_PROPERTY_RESPONSE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ChatResponse {
public static final String JSON_PROPERTY_RESPONSE = "response";
private String response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


package de.tum.in.www1.hephaestus.intelligenceapi.model;
package de.tum.in.www1.hephaestus.intelligenceservice.model;

import java.util.Objects;
import java.util.Arrays;
Expand All @@ -20,7 +20,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import de.tum.in.www1.hephaestus.intelligenceapi.model.ValidationError;
import de.tum.in.www1.hephaestus.intelligenceservice.model.ValidationError;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -34,7 +34,7 @@
@JsonPropertyOrder({
HTTPValidationError.JSON_PROPERTY_DETAIL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class HTTPValidationError {
public static final String JSON_PROPERTY_DETAIL = "detail";
private List<ValidationError> detail = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


package de.tum.in.www1.hephaestus.intelligenceapi.model;
package de.tum.in.www1.hephaestus.intelligenceservice.model;

import java.util.Objects;
import java.util.Arrays;
Expand All @@ -20,7 +20,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import de.tum.in.www1.hephaestus.intelligenceapi.model.ValidationErrorLocInner;
import de.tum.in.www1.hephaestus.intelligenceservice.model.ValidationErrorLocInner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -36,7 +36,7 @@
ValidationError.JSON_PROPERTY_MSG,
ValidationError.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ValidationError {
public static final String JSON_PROPERTY_LOC = "loc";
private List<ValidationErrorLocInner> loc = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


package de.tum.in.www1.hephaestus.intelligenceapi.model;
package de.tum.in.www1.hephaestus.intelligenceservice.model;

import java.util.Objects;
import java.util.Arrays;
Expand All @@ -26,7 +26,7 @@
@JsonPropertyOrder({
})
@JsonTypeName("ValidationError_loc_inner")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-29T19:53:57.523401+01:00[Europe/Berlin]", comments = "Generator version: 7.7.0")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ValidationErrorLocInner {
public ValidationErrorLocInner() {
}
Expand Down

0 comments on commit 2efdc4c

Please sign in to comment.