shopware5 / devdocs

Shopware 5 Developers Website
https://developers.shopware.com
138 stars 231 forks source link

Rewrite API examples to JSON, add badges to represent the HTTP request method #1044

Closed philipreinken closed 4 years ago

philipreinken commented 4 years ago

Like described in the title - I rewrote all examples from using the example-client written in PHP to JSON. This means the examples can now be copied and executed with any HTTP-Client.

Instead of showing the method to be used via function calls $client->post(), they're now displayed using a colour-coded badge.

There are two issues still left to be discussed I think:

  1. Should the example client still be documented? (I left it as it is)
  2. There are a few pages which show GET requests with request-bodies and I didn't rewrite those, as I think they rely on non-standard behaviour. Should these examples be kept or deleted?
mitelg commented 4 years ago

looks good :+1:

  1. I would delete the example client. JSON is not restricted to any programming language and everybody knows how to use it, in his environment.
  2. Especially cases which are not standard must be documented! so of course do not delete them
philipreinken commented 4 years ago

Yes, that sounds reasonable :sweat_smile: I removed the PHP example client and documented the other cases I left out before.

mitelg commented 4 years ago

thank you very much @philipgatzka :+1: :tada: :blue_heart: really nice work