scalapb.validate.validate

Type members

Classlikes

@SerialVersionUID(0L)
final case
class Dummy(dummy: Option[FieldRules], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[Dummy]
Companion
object
object Dummy extends GeneratedMessageCompanion[Dummy] with JavaProtoSupport[Dummy, Dummy]
Companion
class
@SerialVersionUID(0L)
final case
class FieldValidationOptions(skipUniqueCheck: Option[Boolean], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[FieldValidationOptions]
Value Params
skipUniqueCheck

not implemented yet

Companion
object
object FieldValidationOptions extends GeneratedMessageCompanion[FieldValidationOptions] with JavaProtoSupport[FieldValidationOptions, FieldValidationOptions]
Companion
class
@SerialVersionUID(0L)
final case
class FileValidationOptions(insertValidatorInstance: Option[Boolean], validateAtConstruction: Option[Boolean], uniqueToSet: Option[Boolean], catsTransforms: Option[Boolean], skip: Option[Boolean], skipPackages: Seq[String], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[FileValidationOptions]
Value Params
catsTransforms

transform to non-empty map, list and set.

skip

Set skip to true to avoid generating validators for this file. This option is also useful to be set a package-scoped option for third-party protos that do not come with validator classes and your messages reference them.

skipPackages

List of packages that are known to not have validators generated for them. Same effect as setting skip to true for all files in the package. This is useful when package-scoped options for that third-party package are already defined.

uniqueToSet

The following options inject field transformations in the proto they are defined on. In order to take effect, scalapb-validate's preprocessor need to be enabled in the same file where these options are set. Example: import "scalapb/validate.proto"; import "scalapb/scalapb.proto"; option (scalapb.options) = { scope : PACKAGE // makes the FieldTransformations available for the entire package preprocessors : [ "scalapb-validate-preprocessor" ] [scalapb.validate.file] { cats_transforms : true unique_to_set : true } } transform "repeated.unique: true" to sets.

Companion
object
object FileValidationOptions extends GeneratedMessageCompanion[FileValidationOptions] with JavaProtoSupport[FileValidationOptions, FileValidationOptions]
Companion
class
@SerialVersionUID(0L)
final case
class MessageValidationOptions(insertValidatorInstance: Option[Boolean], validateAtConstruction: Option[Boolean], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[MessageValidationOptions]

Falls back on file validation options (where default exists)

Falls back on file validation options (where default exists)

Companion
object
object MessageValidationOptions extends GeneratedMessageCompanion[MessageValidationOptions] with JavaProtoSupport[MessageValidationOptions, MessageValidationOptions]
Companion
class
object ValidateProto extends GeneratedFileObject