jadeleeuw/TE-jitpack-serialization


Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.jadeleeuw:te-jitpack-serialization:1.21'
	}
	dependencies {
		implementation("com.github.jadeleeuw:te-jitpack-serialization:1.21")
	}
	<dependency>
	    <groupId>com.github.jadeleeuw</groupId>
	    <artifactId>te-jitpack-serialization</artifactId>
	    <version>1.21</version>
	</dependency>

                            
    libraryDependencies += "com.github.jadeleeuw" % "te-jitpack-serialization" % "1.21"
        
        

                            
    :dependencies [[com.github.jadeleeuw/te-jitpack-serialization "1.21"]]
        
        

Readme


openapi-java-client

Serialization API

  • API version: 1.0
    • Build date: 2019-05-21T13:46:39.597167+02:00[Europe/Amsterdam]

All endpoints related to the serialization assignment.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires: 1. Java 1.8+ 2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "org.openapitools:openapi-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:


import sdk.serialization.*;
import sdk.serialization.auth.*;
import sdk.serialization.model.*;
import sdk.serialization.api.AssignmentAApi;

import java.io.File;
import java.util.*;

public class AssignmentAApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: idKey
        ApiKeyAuth idKey = (ApiKeyAuth) defaultClient.getAuthentication("idKey");
        idKey.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //idKey.setApiKeyPrefix("Token");

        AssignmentAApi apiInstance = new AssignmentAApi();
        List<String> requestBody = Arrays.asList(); // List<String> | The array of PSU identifiers.
        try {
            SubmissionResult result = apiInstance.verifyA1(requestBody);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AssignmentAApi#verifyA1");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://jeansthesis.nl:8080

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AssignmentAApi | verifyA1 | POST /serialization/a/1 | verify assignment A1 AssignmentAApi | verifyA2 | POST /serialization/a/2 | verify assignment A2 AssignmentBApi | verifyB | POST /serialization/b | verify assignment B OptionalAssignmentCApi | verifyC | POST /optional/serialization/c | verify assignment C WarehouseApi | assemblePC | POST /warehouse/assemble | Assemble PC parts into a PC. WarehouseApi | getCPUs | GET /warehouse/cpus | Returns all CPUs WarehouseApi | getCases | GET /warehouse/cases | Returns all PC cases WarehouseApi | getCatalog | GET /warehouse/catalog | Returns a catalog containing all parts divided in categories WarehouseApi | getGPUs | GET /warehouse/gpus | Returns all GPUs WarehouseApi | getPSUs | GET /warehouse/psus | Returns all PSUs WarehouseApi | getPartslist | GET /warehouse/partslist | Returns all parts in the warehouse in one list WarehouseApi | getProduct | GET /warehouse/product/{productId} | Get product/part by ID WarehouseApi | getStockRequest | GET /warehouse/stock/requests/assignment_c | Get stock request WebstoreApi | getCustomer | GET /webstore/customer/{customerId} | Get customer by ID WebstoreApi | getOrderRequest | GET /webstore/orders/requests/assignment_b | Get order request

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

idKey

  • Type: API key
  • API key parameter name: x-idkey
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author