Skip to content

Commit

Permalink
add generated engine-api from https://docs.docker.com/engine/api/v1.41/
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Jun 22, 2021
1 parent a702ab1 commit 256ec8e
Show file tree
Hide file tree
Showing 76 changed files with 14,916 additions and 2 deletions.
22 changes: 21 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ plugins {
id("net.ossindex.audit") version "0.4.11"
id("io.freefair.maven-central.validate-poms") version "5.3.3.3"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("org.jetbrains.kotlin.jvm") version "1.4.30" apply false
id("org.jetbrains.kotlin.kapt") version "1.4.30" apply false
}

val dependencyVersions = listOf(
"com.fasterxml.jackson.core:jackson-databind:2.9.10.8",
"com.squareup.moshi:moshi:1.12.0",
"com.squareup.okio:okio:2.10.0",
"org.apache.commons:commons-lang3:3.12.0",
"org.apiguardian:apiguardian-api:1.1.0",
"org.codehaus.groovy:groovy:2.5.14",
"org.codehaus.groovy:groovy-json:2.5.14",
"org.codehaus.groovy:groovy-macro:2.5.14",
Expand All @@ -15,7 +22,20 @@ val dependencyVersions = listOf(
"org.codehaus.groovy:groovy-templates:2.5.14",
"org.codehaus.groovy:groovy-test:2.5.14",
"org.codehaus.groovy:groovy-xml:2.5.14",
"org.jetbrains:annotations:21.0.1"
"org.jetbrains:annotations:21.0.1",
"org.jetbrains.kotlin:kotlin-reflect:1.4.30",
"org.jetbrains.kotlin:kotlin-stdlib:1.4.30",
"org.jetbrains.kotlin:kotlin-stdlib-common:1.4.30",
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.30",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.30",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3",
"org.junit:junit-bom:5.7.2",
"org.junit.jupiter:junit-jupiter-api:5.7.2",
"org.junit.platform:junit-platform-commons:1.7.2",
"org.junit.platform:junit-platform-engine:1.7.2",
"org.junit.platform:junit-platform-launcher:1.7.2",
"org.junit.platform:junit-platform-suite-api:1.7.2",
"org.opentest4j:opentest4j:1.2.0"
)

val dependencyVersionsByGroup = mapOf<String, String>()
Expand Down
2 changes: 1 addition & 1 deletion client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
api("de.gesellix:docker-engine:2021-06-18T21-30-35")
api("de.gesellix:docker-compose:2021-06-06T19-36-20")

implementation("org.codehaus.groovy:groovy:[2.5,)")
api("org.codehaus.groovy:groovy:[2.5,)")
implementation("org.codehaus.groovy:groovy-json:[2.5,)")

api("com.squareup.moshi:moshi:[1.9,2)")
Expand Down
21 changes: 21 additions & 0 deletions engine-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# exclude jar for gradle wrapper
!gradle/wrapper/*.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# build files
**/target
target
.gradle
build
321 changes: 321 additions & 0 deletions engine-api/README.md

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions engine-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
plugins {
id("java")
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlin.kapt")
id("com.github.ben-manes.versions")
}

version = "1.41"

repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
implementation("com.squareup.moshi:moshi:1.12.0")
// implementation("com.squareup.moshi:moshi-kotlin:1.12.0")
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.12.0")
implementation("com.squareup.okhttp3:okhttp:4.9.1")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.2")
implementation("de.gesellix:docker-api-model:2021-06-18T21-30-35")
implementation("de.gesellix:docker-engine:2021-06-18T21-30-35")
implementation("de.gesellix:docker-filesocket:2021-06-06T17-29-35")

// implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
// implementation("org.apache.commons:commons-lang3:3.10")
// implementation("javax.annotation:javax.annotation-api:1.3.2")
// testImplementation("junit:junit:4.13.1")
}

tasks.withType(Test::class.java) {
useJUnitPlatform()
}

//tasks.javadoc {
// options.tags = ["http.response.details:a:Http Response Details"]
//}
240 changes: 240 additions & 0 deletions engine-api/docs/ConfigApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
# ConfigApi

All URIs are relative to *http://localhost/v1.41*

Method | HTTP request | Description | Integration tests
------------- | ------------- | ------------- | ---
[**configCreate**](ConfigApi.md#configCreate) | **POST** /configs/create | Create a config | ✅
[**configDelete**](ConfigApi.md#configDelete) | **DELETE** /configs/{id} | Delete a config | ✅
[**configInspect**](ConfigApi.md#configInspect) | **GET** /configs/{id} | Inspect a config | ✅
[**configList**](ConfigApi.md#configList) | **GET** /configs | List configs | ✅
[**configUpdate**](ConfigApi.md#configUpdate) | **POST** /configs/{id}/update | Update a Config | ✅


<a name="configCreate"></a>
# **configCreate**
> IdResponse configCreate(body)
Create a config

### Example
```kotlin
// Import classes:
//import org.openapitools.client.infrastructure.*
//import de.gesellix.docker.engine.model.*

val apiInstance = ConfigApi()
val body : UNKNOWN_BASE_TYPE = // UNKNOWN_BASE_TYPE |
try {
val result : IdResponse = apiInstance.configCreate(body)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConfigApi#configCreate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConfigApi#configCreate")
e.printStackTrace()
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| | [optional]

### Return type

[**IdResponse**](IdResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="configDelete"></a>
# **configDelete**
> configDelete(id)
Delete a config

### Example
```kotlin
// Import classes:
//import org.openapitools.client.infrastructure.*
//import de.gesellix.docker.engine.model.*

val apiInstance = ConfigApi()
val id : kotlin.String = id_example // kotlin.String | ID of the config
try {
apiInstance.configDelete(id)
} catch (e: ClientException) {
println("4xx response calling ConfigApi#configDelete")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConfigApi#configDelete")
e.printStackTrace()
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **kotlin.String**| ID of the config |

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="configInspect"></a>
# **configInspect**
> Config configInspect(id)
Inspect a config

### Example
```kotlin
// Import classes:
//import org.openapitools.client.infrastructure.*
//import de.gesellix.docker.engine.model.*

val apiInstance = ConfigApi()
val id : kotlin.String = id_example // kotlin.String | ID of the config
try {
val result : Config = apiInstance.configInspect(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConfigApi#configInspect")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConfigApi#configInspect")
e.printStackTrace()
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **kotlin.String**| ID of the config |

### Return type

[**Config**](Config.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="configList"></a>
# **configList**
> kotlin.collections.List&lt;Config&gt; configList(filters)
List configs

### Example
```kotlin
// Import classes:
//import org.openapitools.client.infrastructure.*
//import de.gesellix.docker.engine.model.*

val apiInstance = ConfigApi()
val filters : kotlin.String = filters_example // kotlin.String | A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters: - `id=<config id>` - `label=<key> or label=<key>=value` - `name=<config name>` - `names=<config name>`
try {
val result : kotlin.collections.List<Config> = apiInstance.configList(filters)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConfigApi#configList")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConfigApi#configList")
e.printStackTrace()
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**filters** | **kotlin.String**| A JSON encoded value of the filters (a &#x60;map[string][]string&#x60;) to process on the configs list. Available filters: - &#x60;id&#x3D;&lt;config id&gt;&#x60; - &#x60;label&#x3D;&lt;key&gt; or label&#x3D;&lt;key&gt;&#x3D;value&#x60; - &#x60;name&#x3D;&lt;config name&gt;&#x60; - &#x60;names&#x3D;&lt;config name&gt;&#x60; | [optional]

### Return type

[**kotlin.collections.List&lt;Config&gt;**](Config.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="configUpdate"></a>
# **configUpdate**
> configUpdate(id, version, body)
Update a Config

### Example
```kotlin
// Import classes:
//import org.openapitools.client.infrastructure.*
//import de.gesellix.docker.engine.model.*

val apiInstance = ConfigApi()
val id : kotlin.String = id_example // kotlin.String | The ID or name of the config
val version : kotlin.Long = 789 // kotlin.Long | The version number of the config object being updated. This is required to avoid conflicting writes.
val body : ConfigSpec = // ConfigSpec | The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values.
try {
apiInstance.configUpdate(id, version, body)
} catch (e: ClientException) {
println("4xx response calling ConfigApi#configUpdate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConfigApi#configUpdate")
e.printStackTrace()
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **kotlin.String**| The ID or name of the config |
**version** | **kotlin.Long**| The version number of the config object being updated. This is required to avoid conflicting writes. |
**body** | [**ConfigSpec**](ConfigSpec.md)| The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values. | [optional]

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json, text/plain
- **Accept**: application/json, text/plain

Loading

0 comments on commit 256ec8e

Please sign in to comment.