[Python] Add echo_api test object serialization for multipart requests (#18176)

* [python] echo add test object serialization for multipart requests

* [echo api] update samples

* [echo api] update samples
This commit is contained in:
ふぁ
2024-03-23 22:40:10 +09:00
committed by GitHub
parent 420e49f258
commit 5e9546451c
137 changed files with 7427 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.ApiResponse;
import org.openapitools.client.model.TestFormObjectMultipartRequestMarker;
import java.util.ArrayList;
import java.util.HashMap;
@@ -48,6 +49,35 @@ public interface FormApi extends ApiClient.Api {
/**
* Test form parameter(s) for multipart schema
* Test form parameter(s) for multipart schema
* @param marker (required)
* @return String
*/
@RequestLine("POST /form/object/multipart")
@Headers({
"Content-Type: multipart/form-data",
"Accept: text/plain",
})
String testFormObjectMultipart(@Param("marker") TestFormObjectMultipartRequestMarker marker);
/**
* Test form parameter(s) for multipart schema
* Similar to <code>testFormObjectMultipart</code> but it also returns the http response headers .
* Test form parameter(s) for multipart schema
* @param marker (required)
* @return A ApiResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /form/object/multipart")
@Headers({
"Content-Type: multipart/form-data",
"Accept: text/plain",
})
ApiResponse<String> testFormObjectMultipartWithHttpInfo(@Param("marker") TestFormObjectMultipartRequestMarker marker);
/**
* Test form parameter(s) for oneOf schema
* Test form parameter(s) for oneOf schema

View File

@@ -0,0 +1,97 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
/**
* TestFormObjectMultipartRequestMarker
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class TestFormObjectMultipartRequestMarker {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public TestFormObjectMultipartRequestMarker() {
}
public TestFormObjectMultipartRequestMarker name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestFormObjectMultipartRequestMarker testFormObjectMultipartRequestMarker = (TestFormObjectMultipartRequestMarker) o;
return Objects.equals(this.name, testFormObjectMultipartRequestMarker.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestFormObjectMultipartRequestMarker {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,46 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.junit.jupiter.api.Test;
/**
* Model tests for TestFormObjectMultipartRequestMarker
*/
class TestFormObjectMultipartRequestMarkerTest {
private final TestFormObjectMultipartRequestMarker model = new TestFormObjectMultipartRequestMarker();
/**
* Model tests for TestFormObjectMultipartRequestMarker
*/
@Test
void testTestFormObjectMultipartRequestMarker() {
// TODO: test TestFormObjectMultipartRequestMarker
}
/**
* Test the property 'name'
*/
@Test
void nameTest() {
// TODO: test name
}
}