Skip to content

feat: add support prefix items#2018

Merged
AlexVarchuk merged 3 commits intomasterfrom
feat/add-support-prefix-items
May 30, 2022
Merged

feat: add support prefix items#2018
AlexVarchuk merged 3 commits intomasterfrom
feat/add-support-prefix-items

Conversation

@AlexVarchuk
Copy link
Copy Markdown
Collaborator

@AlexVarchuk AlexVarchuk commented May 23, 2022

What/Why/How?

fixes: #1908

  • add support items can be array
  • add support prefixItems for OpenApi 3.1
  • update openapi-sampler to v1.3.0

TODO: fix examples
OpenApi 3.1

       addresses:
          type: array
          minItems: 0
          maxLength: 10
          prefixItems:
            - type: object
              properties:
                city:
                  type: string
                  minLength: 0
                country:
                  type: string
                  minLength: 0
                street:
                  description: includes build/apartment number
                  type: string
                  minLength: 0
          items:
            type: string

OpenApi 3.0

       addresses:
          type: array
          minItems: 0
          maxLength: 10
          items:
            - type: object
              properties:
                city:
                  type: string
                  minLength: 0
                country:
                  type: string
                  minLength: 0
                street:
                  description: includes build/apartment number
                  type: string
                  minLength: 0
          additionalItems:
            type: string

Reference

Testing

Screenshots (optional)

Screenshot 2022-05-23 at 11 39 37

## Check yourself
  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@AlexVarchuk AlexVarchuk changed the title Feat/add support prefix items feat: add support prefix items May 23, 2022
@AlexVarchuk AlexVarchuk self-assigned this May 23, 2022
@AlexVarchuk AlexVarchuk marked this pull request as ready for review May 24, 2022 12:32
@AlexVarchuk AlexVarchuk requested a review from a team as a code owner May 24, 2022 12:32
@AlexVarchuk AlexVarchuk requested review from RomanHotsiy, anastasiia-developer and zalesky and removed request for a team May 24, 2022 12:32
@AlexVarchuk AlexVarchuk force-pushed the feat/add-support-prefix-items branch 3 times, most recently from 48bf323 to edd00d1 Compare May 25, 2022 09:15
@AlexVarchuk AlexVarchuk force-pushed the feat/add-support-prefix-items branch from edd00d1 to d5bc322 Compare May 26, 2022 13:40
@anastasiia-developer
Copy link
Copy Markdown
Contributor

anastasiia-developer commented May 27, 2022

Is this expected behavior?

Screenshot 2022-05-27 at 19 09 11

it seemed to me too much
the label and the text duplication

[ 1 .. 10 ] items

@AlexVarchuk AlexVarchuk force-pushed the feat/add-support-prefix-items branch from 08b6d60 to 6a8d2f1 Compare May 30, 2022 13:16
@AlexVarchuk AlexVarchuk merged commit b98c7a0 into master May 30, 2022
@AlexVarchuk AlexVarchuk deleted the feat/add-support-prefix-items branch May 30, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type label of arrays of any type except string is always followed by empty items information

3 participants