You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to upgrade from guzzle/service 3.x and noticed that ServiceDescription class has been removed. I've seen #15 and #18 regarding the upgrade path. However, the new Description class in guzzle/guzzle-services lacks support for the JSDL "includes" parameter (formerly handled by AbstractConfigLoader). With Guzzle3 the JSDL abstraction was absolutely critical to make the JSON files maintainable (especially to set default "errorResponses" parameter which AFAIK had to be set for each individual status code; see example below). Is there another package I should be referring to for this functionality?
e.g. MainServiceDesc.json:
"includes": [
"CommonModels.json"
],
"operations": {
"GetStuff": {
"extends": "CommonServiceOperation",
"uri": "stuff",
"summary": "Display a list of stuff"
},
and CommonModels.json:
{
"name": "CommonModels",
"apiVersion": "1.0",
"description": "Common model and operations for the api",
"operations": {
"CommonServiceOperation": {
"httpMethod": "GET",
"errorResponses": [
{
"code": 400,
"class": "My\\Api\\CustomResponseException"
},
{
"code": 401,
"class": "My\\Api\\CustomResponseException"
},
This version of Guzzle' service descriptions just takes the input value as-is. Yeah, I would suggest trying to find another package that provide the JSDL style includes and using that along-side this package when resolving descriptions.
I've whipped together a small project which adapts your JSDL loader classes from the 3.x guzzle/service into a standalone project: webbj74/jsdl-loader. This worked for my purposes with minimal changes.
It wasn't clear from your comment above if this feature was dropped intentionally or, you just haven't had a chance to port it to 5.x. If this is something you'd like back in the Guzzle 5.x family, let me know; I'm happy to submit a PR (it's your code after all!).
It wasn't clear from your comment above if this feature was dropped intentionally or, you just haven't had a chance to port it to 5.x.
This is something I intentionally dropped. I wanted to make the library a lot more focused on just serializing and parsing messages. I was hoping libs like yours would spring up and fill in any gaps. Thanks for doing that!
I'm trying to upgrade from guzzle/service 3.x and noticed that ServiceDescription class has been removed. I've seen #15 and #18 regarding the upgrade path. However, the new Description class in guzzle/guzzle-services lacks support for the JSDL "includes" parameter (formerly handled by AbstractConfigLoader). With Guzzle3 the JSDL abstraction was absolutely critical to make the JSON files maintainable (especially to set default "errorResponses" parameter which AFAIK had to be set for each individual status code; see example below). Is there another package I should be referring to for this functionality?
e.g. MainServiceDesc.json:
and CommonModels.json:
References:
The text was updated successfully, but these errors were encountered: