Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit response data #20

Closed
nemozar opened this issue Feb 5, 2020 · 8 comments
Closed

Limit response data #20

nemozar opened this issue Feb 5, 2020 · 8 comments
Assignees
Milestone

Comments

@nemozar
Copy link

nemozar commented Feb 5, 2020

API rerutn list with many items. In test use asserts:

assertJsonStructure([
                [
                    "fio",
                    "login",
                    "validbefore"
                    ]
                ]

in documents generated list with all items.

  1. How i can set limit response data?
  2. How i can set response model with custom example value? In annotations not finded how set different response than real api
@DenTray
Copy link
Collaborator

DenTray commented May 2, 2022

@nemozar the main idea of this package is to automate the collection of documentation as much as possible, so the response example generating from your test cases. You can use small trick to minimize response: just write test with the minimal response size to the last order (package save only latest response example in the doc).

As a feature request, we may implement some limit config to define the max count of records in the test examples.

@DenTray
Copy link
Collaborator

DenTray commented Aug 1, 2022

@pirs1337 could you please proceed with solution I described above? Let's add the config which will set the response example limit (please note that for the paginated data it should affect on the data field).

Also please proceed the exceptions length, in new Laravel versions it looks huge.

@DenTray
Copy link
Collaborator

DenTray commented Aug 1, 2022

image

@pirs1337 also please investigate the array unexpected displaying

pirs1337 added a commit that referenced this issue Aug 14, 2022
pirs1337 added a commit that referenced this issue Oct 31, 2022
pirs1337 added a commit that referenced this issue Oct 31, 2022
pirs1337 added a commit that referenced this issue Jan 18, 2023
pirs1337 added a commit that referenced this issue Jan 18, 2023
pirs1337 added a commit that referenced this issue Jan 23, 2023
pirs1337 added a commit that referenced this issue Jan 23, 2023
pirs1337 added a commit that referenced this issue Feb 1, 2023
pirs1337 added a commit that referenced this issue Feb 1, 2023
DenTray added a commit that referenced this issue Feb 20, 2023
@pirs1337
Copy link
Contributor

@DenTray, ready for testing

@pirs1337 pirs1337 assigned DenTray and unassigned pirs1337 Feb 20, 2023
@DenTray
Copy link
Collaborator

DenTray commented Mar 7, 2023

@NikitaYakovlev could you please test it?

@DenTray DenTray assigned NikitaYakovlev and unassigned DenTray Mar 7, 2023
@NikitaYakovlev
Copy link

unexpected array display not fixed:

image

@Adil9994 Adil9994 self-assigned this Mar 17, 2023
@DenTray DenTray assigned NikitaYakovlev and unassigned Adil9994 Jun 6, 2023
@DenTray DenTray added this to the 2.2 milestone Jun 20, 2023
@DenTray
Copy link
Collaborator

DenTray commented Aug 7, 2023

@NikitaYakovlev thanks! seems it swagger viewer issue, it works fine with elements and rapidoc viewer

@DenTray
Copy link
Collaborator

DenTray commented Nov 7, 2023

Released in 2.2 version

@DenTray DenTray closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants