play
.
boilerplate
.
generators
GeneratorUtils
object
GeneratorUtils
extends
StringUtils
with
DefinitionsSupport
Linear Supertypes
DefinitionsSupport
,
ObjectSupport
,
EnumerationsSupport
,
BaseTypesSupport
,
StringUtils
,
AnyRef
,
Any
Ordering
Alphabetic
By inheritance
Inherited
GeneratorUtils
DefinitionsSupport
ObjectSupport
EnumerationsSupport
BaseTypesSupport
StringUtils
AnyRef
Any
Hide All
Show all
Learn more about member selection
Visibility
Public
All
Type Members
sealed
trait
BodyContentType
extends
AnyRef
sealed
trait
Constraint
extends
AnyRef
Definition Classes
ObjectSupport
implicit final
class
IterableExtensionMethods
[
A
,
Repr
]
extends
AnyVal
case class
ListConstraint
(
constraints:
Seq
[
DefinitionsSupport.Constraint
]
,
tpe:
treehugger.Forest.Type
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
MapConstraint
(
constraints:
Seq
[
DefinitionsSupport.Constraint
]
,
tpe:
treehugger.Forest.Type
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
MaxLength
(
length:
Int
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Maximum
(
value:
Any
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
final
case class
MethodDef
(
tree:
treehugger.Forest.Tree
,
additionalDef:
Seq
[
treehugger.Forest.Tree
]
,
implicits:
Seq
[
treehugger.Forest.Tree
]
)
extends
Product
with
Serializable
case class
MethodParam
(
valDef:
treehugger.Forest.ValDef
,
fullQualified:
treehugger.Forest.ValDef
,
additionalDef:
Seq
[
treehugger.Forest.Tree
]
,
implicits:
Seq
[
treehugger.Forest.Tree
]
,
defaultValue:
Option
[
treehugger.Forest.Tree
]
,
isOptional:
Boolean
,
isImplicit:
Boolean
,
doc:
treehugger.Forest.DocElement
)
extends
Product
with
Serializable
case class
MimeTypeSupport
(
mimeType:
String
,
requestBody:
treehugger.Forest.Tree
,
deserialize: (
treehugger.Forest.Type
) ⇒ (
treehugger.Forest.Ident
) ⇒
treehugger.Forest.Tree
,
serialize: (
treehugger.Forest.Type
) ⇒ (
treehugger.Forest.Ident
) ⇒
treehugger.Forest.Tree
,
logContent: (
treehugger.Forest.Ident
) ⇒
treehugger.Forest.Tree
)
extends
Product
with
Serializable
case class
MinLength
(
length:
Int
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Minimum
(
value:
Any
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectJson
(
reads:
treehugger.Forest.Tree
,
writes:
treehugger.Forest.Tree
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectProperty
(
name:
String
,
support:
TypeSupport
,
noOptType:
treehugger.Forest.Type
,
isOpt:
Boolean
,
isOverride:
Boolean
,
defaultValue:
Option
[
treehugger.Forest.Literal
]
,
constraints:
Seq
[
DefinitionsSupport.Constraint
]
,
description:
Option
[
String
]
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ObjectPropertyJson
(
ident:
String
,
reads:
treehugger.Forest.Enumerator
,
writes:
treehugger.Forest.Tree
)
extends
Product
with
Serializable
Definition Classes
ObjectSupport
case class
Pattern
(
pattern:
String
)
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
case class
ResponseParam
(
headerName:
Option
[
String
]
,
paramName:
String
,
paramDef:
treehugger.Forest.ValDef
,
paramDoc:
treehugger.Forest.DocElement
,
isOptional:
Boolean
)
extends
Product
with
Serializable
Value Members
final
def
!=
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
!=
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
final
def
##
()
:
Int
Definition Classes
AnyRef → Any
final
def
==
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
==
(
arg0:
Any
)
:
Boolean
Definition Classes
Any
final
val
ACTION_ANYCONTENT
:
treehugger.Forest.Type
final
val
ACTION_EMPTY
:
treehugger.Forest.Type
object
Email
extends
DefinitionsSupport.Constraint
with
Product
with
Serializable
Definition Classes
ObjectSupport
final
def
FUTURE
(
tpe:
treehugger.Forest.Type
)
:
treehugger.Forest.Type
final
def
F_OF_TYPE
(
tpe:
treehugger.Forest.Type
)
:
treehugger.Forest.Type
final
val
F_TYPEVAR
:
TypeDefTreeStart
object
FormUrlencoded
extends
BodyContentType
with
Product
with
Serializable
final
def
IDENTITY
(
tpe:
treehugger.Forest.Type
)
:
treehugger.Forest.Tree
final
def
JSON_TO_STRING
(
json:
treehugger.Forest.Tree
)
:
treehugger.Forest.Tree
final
def
JSON_TO_TYPE
(
tpe:
treehugger.Forest.Type
)
(
ident:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
final
def
LOG_JSON
(
ident:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
final
val
MIME_TYPE_APPLICATION_OCTET_STREAM
: String("application/octet-stream")
final
val
MIME_TYPE_FORM_URLENCODED
: String("application/x-www-form-urlencoded")
final
val
MIME_TYPE_JSON
: String("application/json")
final
val
MIME_TYPE_MULTIPART_FORMDATA
: String("multipart/form-data")
final
val
MIME_TYPE_TEXT
: String("text/plain")
val
MaxJsonArity
:
Int
Definition Classes
ObjectSupport
object
MultipartFormData
extends
BodyContentType
with
Product
with
Serializable
object
NoContent
extends
BodyContentType
with
Product
with
Serializable
final
def
PAIR
(
key:
treehugger.Forest.Tree
,
value:
treehugger.Forest.Tree
)
:
treehugger.Forest.Tree
final
val
PARSER_ANYCONTENT
:
treehugger.Forest.Tree
final
val
PARSER_EMPTY
:
treehugger.Forest.Tree
final
def
RANDOM_UUID
:
treehugger.Forest.Tree
final
def
RANDOM_UUID_STRING
:
treehugger.Forest.Tree
final
val
REQUEST_AS_JSON
:
treehugger.Forest.Tree
final
val
REQUEST_AS_TEXT
:
treehugger.Forest.Tree
final
val
REQUEST_EMPTY
:
treehugger.Forest.Tree
object
SimpleContent
extends
BodyContentType
with
Product
with
Serializable
final
def
TYPE_TO_JSON
(
tpe:
treehugger.Forest.Type
)
(
ident:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
final
val
UnexpectedResultClass
:
treehugger.Forest.TypeName
final
val
UnexpectedResultClassName
: String("UnexpectedResult")
final
def
asInstanceOf
[
T0
]
:
T0
Definition Classes
Any
def
classNameToPath
(
packageName:
String
,
className:
String
,
ext:
String
)
:
String
Definition Classes
StringUtils
def
cleanDuplicateSlash
(
s:
String
)
:
String
Definition Classes
StringUtils
def
clone
()
:
AnyRef
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
...
)
def
collectPropertyConstraints
(
property:
Definition
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
Constraint
]
Definition Classes
ObjectSupport
def
collectTypeContainers
(
definition:
Definition
)
:
Seq
[
String
]
Definition Classes
DefinitionsSupport
def
composeClassName
(
objName:
String
)
:
String
Definition Classes
ObjectSupport
def
composeFullClassName
(
objName:
String
,
obj:
ComplexDefinition
)
(
implicit
ctx:
GeneratorContext
)
:
String
Definition Classes
ObjectSupport
def
composeInterfaceName
(
objName:
String
)
:
String
Definition Classes
ObjectSupport
def
composeName
(
parts:
String
*
)
:
String
Definition Classes
StringUtils
def
decapitalize
(
s:
String
)
:
String
Definition Classes
StringUtils
val
defaultJsonSupport
:
MimeTypeSupport
def
distinctTreeByName
(
trees:
Seq
[
treehugger.Forest.Tree
]
)
:
Seq
[
treehugger.Forest.Tree
]
final
def
eq
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
def
equals
(
arg0:
Any
)
:
Boolean
Definition Classes
AnyRef → Any
def
filterNonEmptyTree
(
trees:
Seq
[
treehugger.Forest.Tree
]
)
:
Seq
[
treehugger.Forest.Tree
]
def
finalize
()
:
Unit
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
classOf[java.lang.Throwable]
)
def
findHeaderParameter
(
path:
Path
,
operation:
Operation
,
headerName:
String
)
:
Option
[
HeaderParameter
]
def
getBodyContentType
(
schema:
Schema
,
path:
Path
,
operation:
Operation
)
:
BodyContentType
def
getBodyParameters
(
path:
Path
,
operation:
Operation
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[(
String
,
MethodParam
)]
def
getBooleanSupport
(
bool:
BooleanDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
final
def
getClass
()
:
Class
[_]
Definition Classes
AnyRef → Any
def
getComplexObjectSupport
(
complex:
ComplexObjectDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
ObjectSupport
def
getDateSupport
(
date:
DateDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDateTimeSupport
(
dt:
DateTimeDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDecimalSupport
(
decimal:
DecimalDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getDefaultValue
(
definition:
Definition
)
:
Option
[
treehugger.Forest.Literal
]
def
getDoubleSupport
(
double:
DoubleDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getEmailSupport
(
str:
EmailDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getEnumSupport
(
enum:
EnumDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
EnumerationsSupport
def
getFileName
(
fileName:
String
)
:
String
Definition Classes
StringUtils
def
getFileSupport
(
file:
FileDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getFloatSupport
(
float:
FloatDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getFullParametersList
(
path:
Path
,
operation:
Operation
)
:
Seq
[
Parameter
]
def
getIntegerSupport
(
int:
IntegerDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getLongSupport
(
long:
LongDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getMethodParam
(
param:
Parameter
)
(
implicit
ctx:
GeneratorContext
)
: (
String
,
MethodParam
)
def
getMethodParameters
(
path:
Path
,
operation:
Operation
,
withHeaders:
Boolean
=
true
,
withFormData:
Boolean
=
true
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[(
String
,
MethodParam
)]
def
getMimeTypeSupport
(
implicit
ctx:
GeneratorContext
)
:
PartialFunction
[
String
,
MimeTypeSupport
]
def
getObjectSupport
(
obj:
ObjectDefinition
,
context:
DefinitionContext
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
ObjectSupport
def
getOperationResponseTraitName
(
operationId:
String
)
:
String
def
getParamImplicits
(
param:
Parameter
,
support:
TypeSupport
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
treehugger.Forest.Tree
]
def
getParameterIdentifier
(
param:
Parameter
)
:
String
Definition Classes
StringUtils
def
getReadsConstraint
(
constraint:
Constraint
,
noOptType:
treehugger.Forest.Type
)
:
treehugger.Forest.Tree
Definition Classes
ObjectSupport
def
getResponseBodyType
(
response:
Response
)
(
implicit
ctx:
GeneratorContext
)
:
Option
[
TypeSupport
]
def
getResponseClassName
(
operationId:
String
,
responseCode:
ResponseCode
)
:
String
def
getResponseParameters
(
response:
Response
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
ResponseParam
]
def
getSecurityProvider
(
operation:
Operation
)
(
implicit
ctx:
GeneratorContext
)
:
SecurityProvider
def
getSecurityProvider
(
schemaName:
String
)
(
implicit
ctx:
GeneratorContext
)
:
SecurityProvider
def
getSecurityProviderOfSchema
(
schema:
Schema
)
(
implicit
ctx:
GeneratorContext
)
:
Seq
[
SecurityProvider
]
def
getSimpleTypeSupport
(
definition:
SimpleDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getStringSupport
(
str:
StringDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getTypeSupport
(
definition:
Definition
,
context:
DefinitionContext
=
DefinitionContext.default
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
DefinitionsSupport
def
getTypeSupportRef
(
reference:
RefDefinition
,
context:
DefinitionContext
=
DefinitionContext.default
)
(
implicit
ctx:
GeneratorContext
)
:
TypeSupport
Definition Classes
DefinitionsSupport
def
getUUIDSupport
(
uuid:
UUIDDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
getUntypedSupport
(
untyped:
UntypedDefinition
)
:
TypeSupport
Definition Classes
BaseTypesSupport
def
hashCode
()
:
Int
Definition Classes
AnyRef → Any
final
def
isInstanceOf
[
T0
]
:
Boolean
Definition Classes
Any
def
isOptional
(
definition:
Definition
)
:
Boolean
def
isOptional
(
parameter:
Parameter
)
:
Boolean
def
isTraceIdHeaderName
(
headerName:
String
)
(
implicit
ctx:
GeneratorContext
)
:
Boolean
def
isTraceIdHeaderParameter
(
param:
Parameter
)
(
implicit
ctx:
GeneratorContext
)
:
Boolean
def
methodDefinition
(
methodName:
String
,
methodType:
treehugger.Forest.Type
,
methodParams:
Seq
[
MethodParam
]
,
securityParams:
Seq
[
treehugger.Forest.ValDef
]
)
:
DefTreeStart
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
notify
()
:
Unit
Definition Classes
AnyRef
final
def
notifyAll
()
:
Unit
Definition Classes
AnyRef
def
objectNameFromFileName
(
fileName:
String
,
obj:
String
,
skipNotValidChars:
Boolean
=
true
)
:
String
Definition Classes
StringUtils
def
operationMethodDef
(
path:
Path
,
operation:
Operation
,
methodType: (
treehugger.Forest.Type
) ⇒
treehugger.Forest.Type
,
canBeDeprecated:
Boolean
=
true
)
(
body: (
DefTreeStart
) ⇒
treehugger.Forest.DefDef
)
(
implicit
ctx:
GeneratorContext
)
:
MethodDef
def
padTo
(
n:
Int
,
s:
String
)
:
String
Definition Classes
StringUtils
def
sanitizeFileName
(
fileName:
String
)
:
String
Definition Classes
StringUtils
final
val
serviceNameValName
: String("serviceName")
final
val
serviceNameValRef
:
treehugger.Forest.Ident
def
stringToValidIdentifier
(
str:
String
,
skipNotValidChars:
Boolean
)
:
String
Definition Classes
StringUtils
def
supportedMimeTypes
(
implicit
ctx:
GeneratorContext
)
:
Set
[
String
]
final
def
synchronized
[
T0
]
(
arg0: ⇒
T0
)
:
T0
Definition Classes
AnyRef
def
toString
()
:
String
Definition Classes
AnyRef → Any
final
def
traceIdValRef
(
tracer:
treehugger.Forest.Ident
)
:
treehugger.Forest.Tree
final
def
traceMsg
(
msg:
treehugger.Forest.Tree
)
:
treehugger.Forest.Tree
final
val
tracerCtor
:
treehugger.Forest.Tree
final
val
tracerRandom
:
treehugger.Forest.Tree
final
val
tracerType
:
treehugger.Forest.Type
final
val
tracerValName
:
String
final
val
tracerValRef
:
treehugger.Forest.Ident
final
val
tracesImports
:
Seq
[
treehugger.Forest.Import
]
final
def
wait
()
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
final
def
wait
(
arg0:
Long
,
arg1:
Int
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
final
def
wait
(
arg0:
Long
)
:
Unit
Definition Classes
AnyRef
Annotations
@throws
(
...
)
Inherited from
DefinitionsSupport
Inherited from
ObjectSupport
Inherited from
EnumerationsSupport
Inherited from
BaseTypesSupport
Inherited from
StringUtils
Inherited from
AnyRef
Inherited from
Any
Ungrouped