Package org.mockserver.openapi.examples
Class ExampleBuilder
- java.lang.Object
-
- org.mockserver.openapi.examples.ExampleBuilder
-
public class ExampleBuilder extends Object
See: https://github.com/swagger-api/swagger-inflector
-
-
Field Summary
Fields Modifier and Type Field Description static intSAMPLE_BASE_INTEGER_PROPERTY_VALUEstatic booleanSAMPLE_BOOLEAN_PROPERTY_VALUEstatic StringSAMPLE_BYTE_PROPERTY_VALUEstatic StringSAMPLE_DATE_PROPERTY_VALUEstatic StringSAMPLE_DATETIME_PROPERTY_VALUEstatic doubleSAMPLE_DECIMAL_PROPERTY_VALUEstatic doubleSAMPLE_DOUBLE_PROPERTY_VALUEstatic StringSAMPLE_EMAIL_PROPERTY_VALUEstatic floatSAMPLE_FLOAT_PROPERTY_VALUEstatic intSAMPLE_INT_PROPERTY_VALUEstatic intSAMPLE_LONG_PROPERTY_VALUEstatic StringSAMPLE_STRING_PROPERTY_VALUEstatic StringSAMPLE_TIME_PROPERTY_VALUEstatic StringSAMPLE_UUID_PROPERTY_VALUE
-
Constructor Summary
Constructors Constructor Description ExampleBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExamplealreadyProcessedRefExample(String name, Map<String,io.swagger.v3.oas.models.media.Schema> definitions, Map<String,Example> processedModels)static ExamplefromProperty(String name, io.swagger.v3.oas.models.media.Schema<?> property, Map<String,io.swagger.v3.oas.models.media.Schema> definitions, Map<String,Example> processedModels, Set<String> modelsStartedProcessing, StringBuilder location)static ExamplefromSchema(io.swagger.v3.oas.models.media.Schema<?> property, Map<String,io.swagger.v3.oas.models.media.Schema> definitions)static voidmergeTo(ObjectExample output, List<Example> examples)
-
-
-
Field Detail
-
SAMPLE_EMAIL_PROPERTY_VALUE
public static final String SAMPLE_EMAIL_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_UUID_PROPERTY_VALUE
public static final String SAMPLE_UUID_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_STRING_PROPERTY_VALUE
public static final String SAMPLE_STRING_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_INT_PROPERTY_VALUE
public static final int SAMPLE_INT_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_LONG_PROPERTY_VALUE
public static final int SAMPLE_LONG_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_BASE_INTEGER_PROPERTY_VALUE
public static final int SAMPLE_BASE_INTEGER_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_FLOAT_PROPERTY_VALUE
public static final float SAMPLE_FLOAT_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_DOUBLE_PROPERTY_VALUE
public static final double SAMPLE_DOUBLE_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_BOOLEAN_PROPERTY_VALUE
public static final boolean SAMPLE_BOOLEAN_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_BYTE_PROPERTY_VALUE
public static final String SAMPLE_BYTE_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_DATE_PROPERTY_VALUE
public static final String SAMPLE_DATE_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_TIME_PROPERTY_VALUE
public static final String SAMPLE_TIME_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_DATETIME_PROPERTY_VALUE
public static final String SAMPLE_DATETIME_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
SAMPLE_DECIMAL_PROPERTY_VALUE
public static final double SAMPLE_DECIMAL_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromSchema
public static Example fromSchema(io.swagger.v3.oas.models.media.Schema<?> property, Map<String,io.swagger.v3.oas.models.media.Schema> definitions)
-
fromProperty
public static Example fromProperty(String name, io.swagger.v3.oas.models.media.Schema<?> property, Map<String,io.swagger.v3.oas.models.media.Schema> definitions, Map<String,Example> processedModels, Set<String> modelsStartedProcessing, StringBuilder location)
-
alreadyProcessedRefExample
public static Example alreadyProcessedRefExample(String name, Map<String,io.swagger.v3.oas.models.media.Schema> definitions, Map<String,Example> processedModels)
-
mergeTo
public static void mergeTo(ObjectExample output, List<Example> examples)
-
-