softwaremill / softwaremill/tapir

support Validator preservation

Open
#3,408 1 comment 0 reactions 1 assignee View on GitHub

@adamw is already working on this.

Since Dec 22, 2023.

Dominant language
Scala
Stars
1.5k
Forks
468
Avg merge
5h 37m
Merged PRs (30d)
34

Description

Tapir version: 1.9.5
Scala version: 2.13.12

Describe the bug
Can't find a way to keep the validator in case of an optional field

How to reproduce?
https://scastie.scala-lang.org/GVBxeZypSA6DiBcUa1dFGw

Additional information
it will be great if validator.contramap supported option transformation:

None => Validator.pass
Some(enum) => schema.validator

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.