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 Oct 3, 2021
1 parent 64e52fe commit 299ebec
Show file tree
Hide file tree
Showing 99 changed files with 17,417 additions and 33 deletions.
29 changes: 28 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,43 @@ plugins {
id("net.ossindex.audit") version "0.4.11"
id("io.freefair.maven-central.validate-poms") version "6.2.0"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("org.jetbrains.kotlin.jvm") version "1.5.31" apply false
id("org.jetbrains.kotlin.kapt") version "1.5.31" 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:3.0.9",
"org.codehaus.groovy:groovy-json:3.0.9",
"org.jetbrains:annotations:22.0.0"
"org.jetbrains:annotations:22.0.0",
"org.jetbrains.kotlin:kotlin-reflect:1.5.31",
"org.jetbrains.kotlin:kotlin-stdlib:1.5.31",
"org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31",
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31",
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2",
"org.junit:junit-bom:5.8.1",
"org.junit.jupiter:junit-jupiter-api:5.8.1",
"org.junit.platform:junit-platform-commons:1.8.0",
"org.junit.platform:junit-platform-engine:1.8.0",
"org.junit.platform:junit-platform-launcher:1.8.0",
"org.junit.platform:junit-platform-suite-api:1.8.0",
"org.opentest4j:opentest4j:1.2.0"
)

val dependencyVersionsByGroup = mapOf<String, String>()

subprojects {
repositories {
mavenCentral()
}
}

allprojects {
configurations.all {
resolutionStrategy {
Expand Down
2 changes: 1 addition & 1 deletion client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {
api("de.gesellix:docker-engine:2021-09-29T15-30-00")
api("de.gesellix:docker-compose:2021-09-21T08-00-00")

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.12.0,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.

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

version = "1.41"

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

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
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-09-29T15-30-00")
implementation("de.gesellix:docker-engine:2021-09-29T15-30-00")
implementation("de.gesellix:docker-filesocket:2021-09-20T20-10-00")

implementation("org.slf4j:slf4j-api:[1.7,)!!1.7.32")
testImplementation("ch.qos.logback:logback-classic:[1.2,2)!!1.2.6")

// 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 de.gesellix.docker.engine.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 de.gesellix.docker.engine.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 de.gesellix.docker.engine.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 de.gesellix.docker.engine.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 de.gesellix.docker.engine.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 299ebec

Please sign in to comment.