home.social

#dry_schema — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #dry_schema, aggregated by home.social.

  1. How would you use dry-types/dry-schema to map a finite set of possible Strings to
    a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

    Input: ['syn', 'ack']
    Output: [:syn, :ack]

    #dry_rb #dry_types #dry_schema

  2. How would you use dry-types/dry-schema to map a finite set of possible Strings to
    a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

    Input: ['syn', 'ack']
    Output: [:syn, :ack]

    #dry_rb #dry_types #dry_schema

  3. How would you use dry-types/dry-schema to map a finite set of possible Strings to
    a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

    Input: ['syn', 'ack']
    Output: [:syn, :ack]

    #dry_rb #dry_types #dry_schema

  4. How would you use dry-types/dry-schema to map a finite set of possible Strings to
    a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

    Input: ['syn', 'ack']
    Output: [:syn, :ack]

    #dry_rb #dry_types #dry_schema

  5. How would you use dry-types/dry-schema to map a finite set of possible Strings to
    a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

    Input: ['syn', 'ack']
    Output: [:syn, :ack]

    #dry_rb #dry_types #dry_schema