Closed alx-sychev closed 9 months ago
UPD: It will work correctly if I write answers[].text
instead of just answers.text
. So, the example in the documentation should be changed.
I created PR in docs repo: https://github.com/knuckleswtf/scribe-docs/pull/24
Scribe version
4.23.1
PHP version
8.2.10
Framework
Laravel
Framework version
10.22.0
Scribe config
What happened?
I created a request with an array of objects using documentation (https://scribe.knuckles.wtf/laravel/documenting/query-body-parameters#arrays-of-objects).
I got an incorrect result in the request example: an object instead of an array of objects in the request body section, and something very strange in the JS request example.
I see that @stephane-monnot has already fixed the incorrect generation of the request body section in https://github.com/knuckleswtf/scribe/pull/720/files. But I tried to add his changes to my code, and there is a bug in the JS request example anyway.
My request:
Screenshot of the result:
Screenshot of the result (added fix):
Docs