* fixed data type for maps
* fighting line endings
* fighting line endings
* removed commented code
* reverted unintended line break
* reverted unintended line break
* reverted unintended line break
While working with the Magento 2.4 API definition, there were several
issues found. The easiest to resolve is a documentation naming issue.
(The others will be raised for discussion.)
This is known to be an issue with query parameters, but may not be
limited to *just* query parameters.
In the event that a parameter is a mix of arrays and objects, the
template in the documentation for the API function was expanding out the
parameter name such that `foo[0]` would be turned into
`:foo_left_square_bracket0_right_square_bracket`, but the actual
parameter name was being left as `:foo[0]`, which meant that the
documentation did not reflect the actual parameter.
> Note: there are issues with the way that query parameters are put
> together in this sense, which is going to require substantially more
> work to resolve as well as discussion on how these options should be
> implemented, as what the Magento API requires may not be what is
> expected by a different server, and the nature of the input parameters
> is itself incorrect.
* [PHP] Bugfix - model_generic.mustache: missing setter for openAPINullabelsSetToNull (which is invoked in the property setters)
* [AUTOGENERATED] update samples
* [PHP] Added test for nullable fields
* Improves docs generation
* Adds inline composed schemas
* Adds missing from property
* Adds notes info
* Fixes spacing
* Updates notes, generates container properties
* Adds anchors to property schema docs
* Adds format info to docs
* Adds items schema documentation
* Adds doc for additionalProperties
* Adds anchors for response types
* Fixes anchors in endpoint
* Fixes api doc link to model doc
* Removes returnType from api docs because it is unused
* Fixes float and double tests
* [typescript-angular] Update api template to use HttpClient#request instead of its http-method-specific wrappers
* update expected output for integration tests
* regenerate samples
* use .yaml instead of .yml
This is recommended by Symfony standards
* save Bundle files also to src path
* add test for generate ping
* add package imports
* fix expected file names
* why is Api/ApiServer.php missing
* output filenames
* use getAbsolutePath for debug purpose
* do not use punctuation as current directory
* refactor: remove todos
* use also .yaml in test to fix it
* add test for setting a different source directory
* use correct const for setting source dir property in tests
* import the AbstractPhpCodegen in test class
* put also Resources to source path
* save docs not to Resources
* update samples and improve src path in autoload.php and composer.json
* update moved samples
* Better control of when to write MetaOapg
* Makes MetaOapg in Schema a type hint rather than assignmnet
* Samples regenerated
* Adds tuple types
* Removes types info
* Adds _types
* Samples regenerated
* Adds missing mixins, samples regenerated
* SchemaTypeChecker removed
* Samples regnerated
* fix(typescript-fetch): Handle cors errors.
If there is a communication error,
e.g. an OPTIONS request returns 404 not found,
then the whole request is cancelled and there is no
response object (it is undefined).
I observed the following error:
TypeError: Cannot read properties of undefined (reading 'status')
Basically response was undefined.
In order to circumvent this issue, we do a check
to make sure response is "truthy", which works
for objects.
With these code changes, it will throw a ResponseError,
which is what you would expect instead of a TypeError.
* regenerate typescript-fetch stuff
* retry code generation
Co-authored-by: Joe Heyming <jheyming@Roblox.com>