Skip to content

[Schema Inaccuracy] Incorrect type for default property #14

Closed
@MikeRalphson

Description

@MikeRalphson

Schema Inaccuracy

At #/paths/~1repos~1{owner}~1{repo}~1actions~1workflows~1{workflow_id}~1dispatches/post/requestBody/content/application~1json/properties/inputs/default

Expected

expected 'object' to be 'string'

It looks like the default property contains a continuation of the description property, and not an object type default for this schema.

                inputs:
                  type: object
                  description: Input keys and values configured in the workflow file.
                    The maximum number of properties is 10.
                  default: Any default properties configured in the workflow file
                    will be used when `inputs` are omitted.
                  additionalProperties:
                    type: string
                  maxProperties: 10

From the OpenAPI Specification:

default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.

Reproduction Steps

npm i -g swagger2openapi
boast github.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions