File tree Expand file tree Collapse file tree
src/main/groovy/com/github/hauner/openapi/spring/model/datatypes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,32 +21,42 @@ package com.github.hauner.openapi.spring.model.datatypes
2121 *
2222 * @author Martin Hauner
2323 */
24- interface DataType {
24+ trait /* interface*/ DataType {
2525
2626 /**
2727 * The Java type name without package.
2828 *
2929 * @return the type name.
3030 */
31- String getName ()
31+ abstract String getName ()
3232
3333 /**
3434 * The package of this type without class.
3535 */
36- String getPackageName ()
36+ abstract String getPackageName ()
3737
3838 /**
3939 * Provides the import(s) of this type, usually a single import. If it is a generic type it will
4040 * add another import for each generic parameter.
4141 *
4242 * @return import of this type.
4343 */
44- Set<String > getImports ()
44+ abstract Set<String > getImports ()
4545
4646 /**
4747 * Provides the list of imports for the types referenced by this this type.
4848 *
4949 * @return the referenced import list.
5050 */
51- Set<String > getReferencedImports ()
51+ abstract Set<String > getReferencedImports ()
52+
53+ /**
54+ * Provides the constraint information of the data type.
55+ *
56+ * @return the constraints or null if there are no constraints.
57+ */
58+ DataTypeConstraints getConstraints() {
59+ null
60+ }
61+
5262}
You can’t perform that action at this time.
0 commit comments