Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

DataclassesPlugin fixed (for objects and for arrays). #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZdenekM
Copy link

@ZdenekM ZdenekM commented Jul 2, 2020

My attempt to fix the issue #126. It works for objects as well as for arrays of objects. I also propose to change the way how the schema is referenced. Right now it is:

content:
  application/json:
    schema: Pet

while I think this would be more appropriate:

content:
  application/json:
    schema:
      $ref: Pet

This PR also adds support for arrays of objects so definitions like this can be used:

content:
  application/json:
    schema:
      type: array
      items:
        $ref: Pet

@s-knibbs Please let me know what you think about this fix and (hopefully) enhancement.

@ZdenekM
Copy link
Author

ZdenekM commented Sep 16, 2020

@s-knibbs What do you think? If you are ok with the change, I will also update tests and README. It would be great if this PR can make it into release soon - one project I'm working on depends on this. Many thanks!

@ZdenekM ZdenekM marked this pull request as ready for review September 16, 2020 06:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant