mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
CE-1887 Checkstyle!
This commit is contained in:
@ -65,6 +65,7 @@ public class SchemaBuilder
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
@ -73,6 +74,7 @@ public class SchemaBuilder
|
||||
private Class<?> originalClass;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for originalClass
|
||||
**
|
||||
@ -95,6 +97,7 @@ public class SchemaBuilder
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for originalClass
|
||||
**
|
||||
@ -187,23 +190,13 @@ public class SchemaBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenAPIOneOf openAPIOneOfAnnotation = element.getAnnotation(OpenAPIOneOf.class);
|
||||
OpenAPIMapKnownEntries openAPIMapKnownEntriesAnnotation = element.getAnnotation(OpenAPIMapKnownEntries.class);
|
||||
|
||||
OpenAPIOneOf openAPIOneOfAnnotation = element.getAnnotation(OpenAPIOneOf.class);
|
||||
if(openAPIOneOfAnnotation != null)
|
||||
{
|
||||
String description = "[" + element + "]";
|
||||
List<Schema> oneOfList = processOneOfAnnotation(openAPIOneOfAnnotation, c, description);
|
||||
schema.withOneOf(oneOfList);
|
||||
}
|
||||
// todo no, lot like this else if(openAPIMapKnownEntriesAnnotation != null)
|
||||
// todo no, lot like this {
|
||||
// todo no, lot like this schema.withRef("#/components/schemas/" + openAPIMapKnownEntriesAnnotation.value().getSimpleName());
|
||||
// todo no, lot like this // if(openAPIMapKnownEntriesAnnotation.additionalProperties())
|
||||
// todo no, lot like this // {
|
||||
// todo no, lot like this // schema.withAdditionalProperties(true);
|
||||
// todo no, lot like this // }
|
||||
// todo no, lot like this }
|
||||
else
|
||||
{
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -35,5 +35,8 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIDescription
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
String value();
|
||||
}
|
||||
|
@ -36,6 +36,9 @@ import java.util.EnumSet;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIEnumSubSet
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<? extends EnumSubSet<?>> value();
|
||||
|
||||
|
||||
|
@ -35,5 +35,8 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIIncludeProperties
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<?>[] ancestorClasses() default { };
|
||||
}
|
||||
|
@ -35,7 +35,13 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIListItems
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<?> value();
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
boolean useRef() default false;
|
||||
}
|
||||
|
@ -35,7 +35,13 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIMapKnownEntries
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<?> value();
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
boolean useRef() default false;
|
||||
}
|
||||
|
@ -35,7 +35,13 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIMapValueType
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<?> value();
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
boolean useRef() default false;
|
||||
}
|
||||
|
@ -35,8 +35,14 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface OpenAPIOneOf
|
||||
{
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Mode mode() default Mode.PERMITTED_SUBCLASSES;
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
Class<?>[] options() default { };
|
||||
|
||||
|
||||
|
@ -153,6 +153,7 @@ public abstract class AbstractEndpointSpec<
|
||||
case PUT -> ApiBuilder.put(fullPath, handler);
|
||||
case PATCH -> ApiBuilder.patch(fullPath, handler);
|
||||
case DELETE -> ApiBuilder.delete(fullPath, handler);
|
||||
default -> throw new IllegalStateException("Unexpected value: " + completeOperation.getHttpMethod());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,6 +167,7 @@ public abstract class AbstractMiddlewareVersion
|
||||
warnIfPathMethodAlreadyUsed(path.getDelete(), completeOperation, spec);
|
||||
path.withDelete(method);
|
||||
}
|
||||
default -> throw new IllegalStateException("Unexpected value: " + completeOperation.getHttpMethod());
|
||||
}
|
||||
|
||||
for(Map.Entry<String, Schema> entry : CollectionUtils.nonNullMap(spec.defineComponentSchemas()).entrySet())
|
||||
|
@ -27,7 +27,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.kingsrook.qqq.middleware.javalin.executors.io.QueryMiddlewareInput;
|
||||
import com.kingsrook.qqq.backend.core.context.QContext;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QCriteriaOperator;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QFilterCriteria;
|
||||
@ -36,6 +35,7 @@ import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryJoin;
|
||||
import com.kingsrook.qqq.backend.core.utils.JsonUtils;
|
||||
import com.kingsrook.qqq.backend.core.utils.StringUtils;
|
||||
import com.kingsrook.qqq.backend.core.utils.collections.MapBuilder;
|
||||
import com.kingsrook.qqq.middleware.javalin.executors.io.QueryMiddlewareInput;
|
||||
import com.kingsrook.qqq.openapi.model.Schema;
|
||||
import com.kingsrook.qqq.openapi.model.Type;
|
||||
import org.json.JSONArray;
|
||||
|
Reference in New Issue
Block a user