Skip to content

Regression: Option[Set[String]] schema renders with type=string instead of type=array #309

@jgulotta

Description

@jgulotta

Given the class

case class OptSetString(strings: Option[Set[String]])

In 2.12.0 the schema incorrectly renders as

{"uniqueItems":true,"type":"string","items":{"type":"string"}}

In 2.7.2 the schema correctly renders as

{"uniqueItems":true,"type":"array","items":{"type":"string"}}

Moreover, the incorrect behavior cannot be overridden by adding an ArraySchema annotation

I suspect this is due to #174 and would apply recursively to any nested structure that eventually has a primitive as the first type parameter. Sorry about the late report on what is now an old change; we've only recently gone about updating our swagger codegen and encountered the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions