Created by: ybelenko
Added Mock Server as fully pre-configured dev only feature.
UPD: how it looks like from the CURL
with production
env:
$ curl --request GET \
> --url 'http://phpslim4.test/v2/pet/findByStatus?status=available' \
> --header 'accept: application/json' \
> --header 'x-openapiserver-mock: ping'
{
"message": "501 Not Implemented"
}
with development
env:
$ curl --request GET \
> --url 'http://phpslim4.test/v2/pet/findByStatus?status=available' \
> --header 'accept: application/json' \
> --header 'x-openapiserver-mock: ping'
[{"id":-8738629417578509312,"category":{"id":-4162503862215270400,"name":"Lorem ipsum dol"},"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem i","photoUrls":["Lor"],"tags":[{"id":-3506202845849391104,"name":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectet"}],"status":"pending"}]
with development
env, but without required HTTP mock header:
$ curl --request GET \
> --url 'http://phpslim4.test/v2/pet/findByStatus?status=available' \
> --header 'accept: application/json'
{
"message": "501 Not Implemented",
"exception": [
{
"type": "Slim\\Exception\\HttpNotImplementedException",
"code": 501,
"message": "How about extending AbstractPetApi by OpenAPIServer\\Api\\PetApi class implementing findPetsByStatus as a GET method?",
"file": "/Users/ybelenko/Sites/openapi-generator/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php",
"line": 861
}
]
}
cc @jebentier @dkarlovi @mandrean @jfastnacht @renepardon
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.