gcp.codegen

package gcp.codegen

Members list

Type members

Classlikes

case class FlatPath(path: String, params: List[String])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class GeneratorConfig(outDir: Path, resourcesPkg: String, schemasPkg: String, httpSource: HttpSource, jsonCodec: JsonCodec, arrayType: ArrayType, dialect: Dialect, preprocess: Specs => Specs)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Method(httpMethod: String, path: String, flatPath: Option[FlatPath], parameters: Map[String, Parameter], parameterOrder: List[String], response: Option[SchemaType], request: Option[SchemaType])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Method

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Method.type
case class Parameter(description: Option[String], location: String, typ: SchemaType, required: Boolean, pattern: Option[String])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Parameter

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Parameter.type
case class Property(description: Option[String], typ: SchemaType, readOnly: Boolean)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Property

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Property.type
case class Resource(methods: Map[String, Method])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ResourcePath

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class Schema(id: SchemaPath, description: Option[String], properties: List[(String, Property)])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Schema

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Schema.type
object SchemaPath

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
SchemaPath.type
enum SchemaType(val optional: Boolean)

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Ref
class Primitive
class Array
class Object
object SchemaType

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SchemaType.type
case class Specs(name: String, protocol: String, ownerName: String, discoveryVersion: String, resources: Map[ResourcePath, Resource], version: String, baseUrl: String, schemas: Map[SchemaPath, Schema])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Specs

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Specs.type
enum SpecsInput

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Task(specsInput: SpecsInput, config: GeneratorConfig)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

opaque type ResourcePath
opaque type SchemaPath

Value members

Concrete methods

def camelToSnakeCase(camelCase: String): String
def commonSchemaCodecs(schemas: Map[SchemaPath, Schema], pkg: String, objName: String, jsonCodec: JsonCodec, dialect: Dialect, hasProps: SchemaPath => Boolean, arrType: ArrayType): Option[String]
def generateBySpec(specs: Specs, config: GeneratorConfig)(using ExecutionContext): Future[List[File]]
def implicitVal(dialect: Dialect): String
def readResources(resources: List[(ResourcePath, Value)], result: Map[ResourcePath, Resource]): Map[ResourcePath, Resource]
def resourceCode(pkg: String, resourcesPkg: String, schemasPkg: String, baseUrl: String, resourceName: String, resource: Resource, httpSource: HttpSource, jsonCodec: JsonCodec, arrType: ArrayType, hasProps: SchemaPath => Boolean): String
def schemasCode(schema: Schema, pkg: String, jsonCodec: JsonCodec, dialect: Dialect, hasProps: SchemaPath => Boolean, arrType: ArrayType, commonCodecsPkg: Option[String]): String
def toScalaName(n: String): String

Concrete fields

val scalaKeyWords: Set[String]

Extensions

Extensions

extension (p: Path)
def /(o: Path): Path
def /(o: Array[String]): Path
def /(o: Vector[String]): Path
def /(o: String): Path