Skip to content

Errors in oneOf not contain path #676

@micronull

Description

@micronull

spec:

components:
  schemas:
    Something:
      type: object
      properties:
        first:
          type: object
          properties:
            second:
              type: object
              properties:
                third:
                  oneOf:
                   - title: First rule
                     type: string
                     minLength: 5
                     maxLength: 5
                   - title: Second rule
                     type: string
                     minLength: 10
                     maxLength: 10

request:

err = doc.Components.Schemas["Something"].Value.VisitJSON(map[string]interface{}{
		"first": map[string]interface{}{
			"second": map[string]interface{}{
				"third": "123456789",
			},
		},
	})

We get an error that does not contain: Error at "/first/second/third".
And JSONPointer does not return the slice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions