question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allOf not working properly within array items

See original GitHub issue

This works correctly:

responses:
  '200':
    description: OK
    schema:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: 'someDefinition.yaml'

This initially loads fine, but gives an error (Can’t load schema at …) when trying to expand the data element in the response schema:

responses:
  '200':
    description: OK
    schema:
      type: object
      properties:
        data:
          type: array
          items:
            allOf:
              - $ref: 'someDefinition.yaml
              - xml
                  name: foo

The schema example on the right side seems to render correctly.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joostfarlacommented, Nov 29, 2016

Works like a charm! Thanks!! 👍

0reactions
RomanHotsiycommented, Nov 28, 2016

@joostfarla new version v1.5.2 has been just released. Let me know if it the issue is solved for you know

Read more comments on GitHub >

github_iconTop Results From Across the Web

allOf not working properly within array items · Issue #136
The schema example on the right side seems to render correctly. The text was updated successfully, but these errors were encountered: ...
Read more >
render issues when extending model via allOf
When extending a base model via the allOf operator, 2 bugs are apparent: 1. In the event of an allOf operator referencing another...
Read more >
Why is my use of JSON Schema `allOf` keyword not ...
The behaviour of duplicate keys in JSON is undefined. Often the way it's handled is just to take the last occurrence of each...
Read more >
Details of the policy definition structure - Azure
Describes how policy definitions are used to establish conventions for Azure resources in your organization.
Read more >
Understanding JSON Schema 2020-12 documentation
All of these keywords must be set to an array, where each item is a schema. In addition, there is: not: (NOT) Must...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found