forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 6.0.x
This commit is contained in:
@@ -14,6 +14,7 @@ pom.xml
|
||||
settings.gradle
|
||||
src/main/AndroidManifest.xml
|
||||
src/main/java/org/openapitools/client/ApiClient.java
|
||||
src/main/java/org/openapitools/client/ApiResponseDecoder.java
|
||||
src/main/java/org/openapitools/client/CustomInstantDeserializer.java
|
||||
src/main/java/org/openapitools/client/EncodingUtils.java
|
||||
src/main/java/org/openapitools/client/ParamExpander.java
|
||||
@@ -45,6 +46,7 @@ src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
|
||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
|
||||
src/main/java/org/openapitools/client/model/Animal.java
|
||||
src/main/java/org/openapitools/client/model/ApiResponse.java
|
||||
src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
|
||||
src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
|
||||
src/main/java/org/openapitools/client/model/ArrayTest.java
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
# Uncomment to build for Android
|
||||
#target = android
|
||||
# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator).
|
||||
# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option.
|
||||
#
|
||||
# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
|
||||
# For example, uncomment below to build for Android
|
||||
#target = android
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
@@ -33,7 +33,7 @@ set APP_HOME=%DIRNAME%
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -22,6 +22,7 @@ import feign.slf4j.Slf4jLogger;
|
||||
import org.openapitools.client.auth.HttpBasicAuth;
|
||||
import org.openapitools.client.auth.HttpBearerAuth;
|
||||
import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.ApiResponseDecoder;
|
||||
|
||||
import org.openapitools.client.auth.ApiErrorDecoder;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
@@ -48,7 +49,7 @@ public class ApiClient {
|
||||
feignBuilder = Feign.builder()
|
||||
.client(new OkHttpClient())
|
||||
.encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
|
||||
.decoder(new JacksonDecoder(objectMapper))
|
||||
.decoder(new ApiResponseDecoder(objectMapper))
|
||||
.errorDecoder(new ApiErrorDecoder())
|
||||
.retryer(new Retryer.Default(0, 0, 2))
|
||||
.logger(new Slf4jLogger());
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import feign.Response;
|
||||
import feign.Types;
|
||||
import feign.jackson.JacksonDecoder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
public class ApiResponseDecoder extends JacksonDecoder {
|
||||
|
||||
public ApiResponseDecoder(ObjectMapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object decode(Response response, Type type) throws IOException {
|
||||
Map<String, Collection<String>> responseHeaders = Collections.unmodifiableMap(response.headers());
|
||||
//Detects if the type is an instance of the parameterized class ApiResponse
|
||||
Type responseBodyType;
|
||||
if (Types.getRawType(type).isAssignableFrom(ApiResponse.class)) {
|
||||
//The ApiResponse class has a single type parameter, the Dto class itself
|
||||
responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0];
|
||||
Object body = super.decode(response, responseBodyType);
|
||||
return new ApiResponse(response.status(), responseHeaders, body);
|
||||
} else {
|
||||
//The response is not encapsulated in the ApiResponse, decode the Dto as normal
|
||||
return super.decode(response, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.openapitools.client;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import feign.Response;
|
||||
import feign.Types;
|
||||
import feign.jackson.JacksonDecoder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.openapitools.client.model.HttpResponse;
|
||||
|
||||
public class JacksonResponseDecoder extends JacksonDecoder {
|
||||
|
||||
public JacksonResponseDecoder(ObjectMapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object decode(Response response, Type type) throws IOException {
|
||||
Map<String, Collection<String>> responseHeaders = Collections.unmodifiableMap(response.headers());
|
||||
//Detects if the type is an instance of the parameterized class HttpResponse
|
||||
Type responseBodyType;
|
||||
if (Types.getRawType(type).isAssignableFrom(HttpResponse.class)) {
|
||||
//The HttpResponse class has a single type parameter, the Dto class itself
|
||||
responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0];
|
||||
Object body = super.decode(response, responseBodyType);
|
||||
return new HttpResponse(responseHeaders, body, response.status());
|
||||
} else {
|
||||
//The response is not encapsulated in the HttpResponse, decode the Dto as normal
|
||||
return super.decode(response, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
@@ -27,4 +28,20 @@ public interface AnotherFakeApi extends ApiClient.Api {
|
||||
"Accept: application/json",
|
||||
})
|
||||
Client call123testSpecialTags(Client body);
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* Similar to <code>call123testSpecialTags</code> but it also returns the http response headers .
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("PATCH /another-fake/dummy")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
@@ -35,6 +36,21 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void createXmlItem(XmlItem xmlItem);
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* Similar to <code>createXmlItem</code> but it also returns the http response headers .
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
*/
|
||||
@RequestLine("POST /fake/create_xml_item")
|
||||
@Headers({
|
||||
"Content-Type: application/xml",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
@@ -48,6 +64,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
Boolean fakeOuterBooleanSerialize(Boolean body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>fakeOuterBooleanSerialize</code> but it also returns the http response headers .
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /fake/outer/boolean")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: */*",
|
||||
})
|
||||
ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
@@ -61,6 +93,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>fakeOuterCompositeSerialize</code> but it also returns the http response headers .
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /fake/outer/composite")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: */*",
|
||||
})
|
||||
ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
@@ -74,6 +122,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
BigDecimal fakeOuterNumberSerialize(BigDecimal body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>fakeOuterNumberSerialize</code> but it also returns the http response headers .
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /fake/outer/number")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: */*",
|
||||
})
|
||||
ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
@@ -87,6 +151,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
String fakeOuterStringSerialize(String body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>fakeOuterStringSerialize</code> but it also returns the http response headers .
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /fake/outer/string")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: */*",
|
||||
})
|
||||
ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
@@ -99,6 +179,21 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testBodyWithFileSchema(FileSchemaTestClass body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>testBodyWithFileSchema</code> but it also returns the http response headers .
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
*/
|
||||
@RequestLine("PUT /fake/body-with-file-schema")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -112,6 +207,21 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testBodyWithQueryParams(@Param("query") String query, User body);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>testBodyWithQueryParams</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
*/
|
||||
@RequestLine("PUT /fake/body-with-query-params?query={query}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(@Param("query") String query, User body);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -135,6 +245,26 @@ public interface FakeApi extends ApiClient.Api {
|
||||
void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Note, this is equivalent to the other <code>testBodyWithQueryParams</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param body (required)
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>query - (required)</li>
|
||||
* </ul>
|
||||
*/
|
||||
@RequestLine("PUT /fake/body-with-query-params?query={query}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(User body, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testBodyWithQueryParams</code> method in a fluent style.
|
||||
*/
|
||||
@@ -158,6 +288,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
Client testClientModel(Client body);
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* Similar to <code>testClientModel</code> but it also returns the http response headers .
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("PATCH /fake")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Client> testClientModelWithHttpInfo(Client body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -183,6 +329,34 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Similar to <code>testEndpointParameters</code> but it also returns the http response headers .
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
*/
|
||||
@RequestLine("POST /fake")
|
||||
@Headers({
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testEndpointParametersWithHttpInfo(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
@@ -205,6 +379,30 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* Similar to <code>testEnumParameters</code> but it also returns the http response headers .
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional)
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
*/
|
||||
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
|
||||
@Headers({
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json",
|
||||
"enum_header_string_array: {enumHeaderStringArray}",
|
||||
|
||||
"enum_header_string: {enumHeaderString}"
|
||||
})
|
||||
ApiResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
|
||||
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
@@ -237,6 +435,35 @@ public interface FakeApi extends ApiClient.Api {
|
||||
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* Note, this is equivalent to the other <code>testEnumParameters</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional)
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>enumQueryStringArray - Query parameter enum test (string array) (optional)</li>
|
||||
* <li>enumQueryString - Query parameter enum test (string) (optional, default to -efg)</li>
|
||||
* <li>enumQueryInteger - Query parameter enum test (double) (optional)</li>
|
||||
* <li>enumQueryDouble - Query parameter enum test (double) (optional)</li>
|
||||
* </ul>
|
||||
*/
|
||||
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
|
||||
@Headers({
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json",
|
||||
"enum_header_string_array: {enumHeaderStringArray}",
|
||||
|
||||
"enum_header_string: {enumHeaderString}"
|
||||
})
|
||||
ApiResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testEnumParameters</code> method in a fluent style.
|
||||
*/
|
||||
@@ -278,6 +505,27 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Similar to <code>testGroupParameters</code> but it also returns the http response headers .
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
*/
|
||||
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
"required_boolean_group: {requiredBooleanGroup}",
|
||||
|
||||
"boolean_group: {booleanGroup}"
|
||||
})
|
||||
ApiResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
|
||||
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@@ -307,6 +555,32 @@ public interface FakeApi extends ApiClient.Api {
|
||||
void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Note, this is equivalent to the other <code>testGroupParameters</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>requiredStringGroup - Required String in group parameters (required)</li>
|
||||
* <li>requiredInt64Group - Required Integer in group parameters (required)</li>
|
||||
* <li>stringGroup - String in group parameters (optional)</li>
|
||||
* <li>int64Group - Integer in group parameters (optional)</li>
|
||||
* </ul>
|
||||
*/
|
||||
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
"required_boolean_group: {requiredBooleanGroup}",
|
||||
|
||||
"boolean_group: {booleanGroup}"
|
||||
})
|
||||
ApiResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testGroupParameters</code> method in a fluent style.
|
||||
*/
|
||||
@@ -341,6 +615,21 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testInlineAdditionalProperties(Map<String, String> param);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* Similar to <code>testInlineAdditionalProperties</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param param request body (required)
|
||||
*/
|
||||
@RequestLine("POST /fake/inline-additionalProperties")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
@@ -354,6 +643,22 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
* Similar to <code>testJsonFormData</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
*/
|
||||
@RequestLine("GET /fake/jsonFormData")
|
||||
@Headers({
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testJsonFormDataWithHttpInfo(@Param("param") String param, @Param("param2") String param2);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
@@ -369,6 +674,23 @@ public interface FakeApi extends ApiClient.Api {
|
||||
})
|
||||
void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context);
|
||||
|
||||
/**
|
||||
*
|
||||
* Similar to <code>testQueryParameterCollectionFormat</code> but it also returns the http response headers .
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
*/
|
||||
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
@@ -394,6 +716,28 @@ public interface FakeApi extends ApiClient.Api {
|
||||
void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* Note, this is equivalent to the other <code>testQueryParameterCollectionFormat</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>pipe - (required)</li>
|
||||
* <li>ioutil - (required)</li>
|
||||
* <li>http - (required)</li>
|
||||
* <li>url - (required)</li>
|
||||
* <li>context - (required)</li>
|
||||
* </ul>
|
||||
*/
|
||||
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testQueryParameterCollectionFormat</code> method in a fluent style.
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
|
||||
@@ -27,4 +28,20 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
|
||||
"Accept: application/json",
|
||||
})
|
||||
Client testClassname(Client body);
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* Similar to <code>testClassname</code> but it also returns the http response headers .
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("PATCH /fake_classname_test")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Client> testClassnameWithHttpInfo(Client body);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
@@ -30,6 +31,21 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
void addPet(Pet body);
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
* Similar to <code>addPet</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
*/
|
||||
@RequestLine("POST /pet")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> addPetWithHttpInfo(Pet body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
@@ -43,6 +59,22 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
* Similar to <code>deletePet</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
*/
|
||||
@RequestLine("DELETE /pet/{petId}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
"api_key: {apiKey}"
|
||||
})
|
||||
ApiResponse<Void> deletePetWithHttpInfo(@Param("petId") Long petId, @Param("apiKey") String apiKey);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@@ -55,6 +87,20 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
List<Pet> findPetsByStatus(@Param("status") List<String> status);
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Similar to <code>findPetsByStatus</code> but it also returns the http response headers .
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(@Param("status") List<String> status);
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@@ -77,6 +123,25 @@ public interface PetApi extends ApiClient.Api {
|
||||
List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Note, this is equivalent to the other <code>findPetsByStatus</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>status - Status values that need to be considered for filter (required)</li>
|
||||
* </ul>
|
||||
* @return List<Pet>
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>findPetsByStatus</code> method in a fluent style.
|
||||
*/
|
||||
@@ -101,6 +166,22 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
Set<Pet> findPetsByTags(@Param("tags") Set<String> tags);
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Similar to <code>findPetsByTags</code> but it also returns the http response headers .
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@Param("tags") Set<String> tags);
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@@ -125,6 +206,27 @@ public interface PetApi extends ApiClient.Api {
|
||||
Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Note, this is equivalent to the other <code>findPetsByTags</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>tags - Tags to filter by (required)</li>
|
||||
* </ul>
|
||||
* @return Set<Pet>
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>findPetsByTags</code> method in a fluent style.
|
||||
*/
|
||||
@@ -147,6 +249,21 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
Pet getPetById(@Param("petId") Long petId);
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Similar to <code>getPetById</code> but it also returns the http response headers .
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Pet> getPetByIdWithHttpInfo(@Param("petId") Long petId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
@@ -159,6 +276,21 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
void updatePet(Pet body);
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
* Similar to <code>updatePet</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
*/
|
||||
@RequestLine("PUT /pet")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> updatePetWithHttpInfo(Pet body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
@@ -173,6 +305,23 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
* Similar to <code>updatePetWithForm</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
*/
|
||||
@RequestLine("POST /pet/{petId}")
|
||||
@Headers({
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> updatePetWithFormWithHttpInfo(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
@@ -188,6 +337,24 @@ public interface PetApi extends ApiClient.Api {
|
||||
})
|
||||
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
* Similar to <code>uploadFile</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /pet/{petId}/uploadImage")
|
||||
@Headers({
|
||||
"Content-Type: multipart/form-data",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
@@ -202,4 +369,22 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Accept: application/json",
|
||||
})
|
||||
ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* Similar to <code>uploadFileWithRequiredFile</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
|
||||
@Headers({
|
||||
"Content-Type: multipart/form-data",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
|
||||
@@ -26,6 +27,20 @@ public interface StoreApi extends ApiClient.Api {
|
||||
})
|
||||
void deleteOrder(@Param("orderId") String orderId);
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* Similar to <code>deleteOrder</code> but it also returns the http response headers .
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
*/
|
||||
@RequestLine("DELETE /store/order/{orderId}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> deleteOrderWithHttpInfo(@Param("orderId") String orderId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
@@ -37,6 +52,20 @@ public interface StoreApi extends ApiClient.Api {
|
||||
})
|
||||
Map<String, Integer> getInventory();
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Similar to <code>getInventory</code> but it also returns the http response headers .
|
||||
* Returns a map of status codes to quantities
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /store/inventory")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@@ -49,6 +78,21 @@ public interface StoreApi extends ApiClient.Api {
|
||||
})
|
||||
Order getOrderById(@Param("orderId") Long orderId);
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* Similar to <code>getOrderById</code> but it also returns the http response headers .
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /store/order/{orderId}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Order> getOrderByIdWithHttpInfo(@Param("orderId") Long orderId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
@@ -61,4 +105,20 @@ public interface StoreApi extends ApiClient.Api {
|
||||
"Accept: application/json",
|
||||
})
|
||||
Order placeOrder(Order body);
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
* Similar to <code>placeOrder</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /store/order")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Order> placeOrderWithHttpInfo(Order body);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.User;
|
||||
|
||||
@@ -27,6 +28,21 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
void createUser(User body);
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* Similar to <code>createUser</code> but it also returns the http response headers .
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
*/
|
||||
@RequestLine("POST /user")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> createUserWithHttpInfo(User body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@@ -39,6 +55,21 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
void createUsersWithArrayInput(List<User> body);
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* Similar to <code>createUsersWithArrayInput</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
*/
|
||||
@RequestLine("POST /user/createWithArray")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@@ -51,6 +82,21 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
void createUsersWithListInput(List<User> body);
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* Similar to <code>createUsersWithListInput</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
*/
|
||||
@RequestLine("POST /user/createWithList")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -62,6 +108,20 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
void deleteUser(@Param("username") String username);
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* Similar to <code>deleteUser</code> but it also returns the http response headers .
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
*/
|
||||
@RequestLine("DELETE /user/{username}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> deleteUserWithHttpInfo(@Param("username") String username);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
@@ -74,6 +134,21 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
User getUserByName(@Param("username") String username);
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
* Similar to <code>getUserByName</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /user/{username}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<User> getUserByNameWithHttpInfo(@Param("username") String username);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
@@ -87,6 +162,21 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
String loginUser(@Param("username") String username, @Param("password") String password);
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
* Similar to <code>loginUser</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<String> loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password);
|
||||
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
@@ -110,6 +200,26 @@ public interface UserApi extends ApiClient.Api {
|
||||
String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* Note, this is equivalent to the other <code>loginUser</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>username - The user name for login (required)</li>
|
||||
* <li>password - The password for login in clear text (required)</li>
|
||||
* </ul>
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<String> loginUserWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>loginUser</code> method in a fluent style.
|
||||
*/
|
||||
@@ -134,6 +244,19 @@ public interface UserApi extends ApiClient.Api {
|
||||
})
|
||||
void logoutUser();
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
* Similar to <code>logoutUser</code> but it also returns the http response headers .
|
||||
*
|
||||
*/
|
||||
@RequestLine("GET /user/logout")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> logoutUserWithHttpInfo();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -146,4 +269,20 @@ public interface UserApi extends ApiClient.Api {
|
||||
"Accept: application/json",
|
||||
})
|
||||
void updateUser(@Param("username") String username, User body);
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* Similar to <code>updateUser</code> but it also returns the http response headers .
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
*/
|
||||
@RequestLine("PUT /user/{username}")
|
||||
@Headers({
|
||||
"Content-Type: */*",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> updateUserWithHttpInfo(@Param("username") String username, User body);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import feign.RetryableException;
|
||||
import feign.codec.ErrorDecoder;
|
||||
|
||||
/**
|
||||
* Error decoder that makes the HTTP 401 and 403 Retryable. Sometimes the 401 or 402 may indicate an expired token
|
||||
* Error decoder that makes the HTTP 401 and 403 Retryable. Sometimes the 401 or 403 may indicate an expired token
|
||||
* All the other HTTP status are handled by the {@link feign.codec.ErrorDecoder.Default} decoder
|
||||
*/
|
||||
public class ApiErrorDecoder implements ErrorDecoder {
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
public class ApiResponse<T>{
|
||||
|
||||
final private int statusCode;
|
||||
final private Map<String, List<String>> headers;
|
||||
final private T data;
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
|
||||
this(statusCode, headers, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
* @param data The object deserialized from response bod
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
|
||||
this.statusCode = statusCode;
|
||||
this.headers = headers;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
public class HttpResponse<T>{
|
||||
|
||||
private Map<String, Collection<String>> headers;
|
||||
|
||||
private T body;
|
||||
|
||||
private int status;
|
||||
|
||||
public HttpResponse(Map<String, Collection<String>> headers, T body, int status) {
|
||||
this.headers = headers;
|
||||
this.body = body;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public T getBody(){
|
||||
return body;
|
||||
}
|
||||
|
||||
public Map<String, Collection<String>> getHeaders(){
|
||||
return headers;
|
||||
}
|
||||
|
||||
public int getStatus(){
|
||||
return status;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user