outline

Zany Zebra answered on June 29, 2022 Popularity 10/10 Helpfulness 2/10

Contents


More Related Answers

  • CSS Outline Style
  • css outline

  • outline

    -2
    Popularity 10/10 Helpfulness 2/10 Language css
    Source: Grepper
    Tags: css outline
    Link to this answer
    Share Copy Link
    Contributed on Jun 29 2022
    Zany Zebra
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    0
    Popularity 10/10 Helpfulness 1/10 Language css
    Source: Grepper
    Tags: css
    Link to this answer
    Share Copy Link
    Contributed on Mar 07 2024
    Abhishek
    0 Answers  Avg Quality 2/10

    -2

    Now that we have that cleared, let’s make a plan for what we actually want to do.

    Steps to perform

    Adjust the URL parameter descriptions of {ID} to mark them as a kind of UUID.

    Adjust the ID attribute of our Product model to mark it as a kind of UUID.

    Adjust the lang attribute of our Translation model to mark it as an ISO-639-1 language code.

    How can we do that?

    Using regular expression from refined type

    If we take a look at the code within the tapir library, we see that the Schema and SchemaFor code, which is used for codecs does not yet support a dedicated UUID type. There is a detour for it using Schema.SString.

    Currently, there is active discussion about changing and extending the schema code in tapir regarding more future possibilities and better documentation options.

    Now, we look a bit further into the OpenAPI code and find that it supports several interesting attributes that we might use. For now, we will stick to the attribute pattern of the Schema class in that part. It is intended to hold a pattern (regular expression) that describes the format of a string type. We need to define some (or better, exactly 2) regular expressions. We already have one for our language code!

    How do we use the existing regular expression from our refined type? Using some shapeless magic, we might use an implicit Witness, which should be provided by our refined type.

    Popularity 10/10 Helpfulness 1/10 Language scala
    Source: Grepper
    Tags: scala scal
    Link to this answer
    Share Copy Link
    Contributed on May 24 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.