Hello, I am sending a GET request using ?include=request_type.
On my class I have created a variable called requestType: Resource? and in the fieldsFromDictionary I have set "requestType": ToOneRelationship(RequestType.self)
The RequestType class has a resourceType of "request-types".
In the include I am using the "requestType"
The JSON which I am receiving contains the request-type with dash and not underscore. As a result I get no value for the requestType variable.
Finally I have used the UnderscoredKeyFormatter.
The main issue is that the include in the url contains an underscore while the key contains a dash.
How can I overcome this type of issue with the underscore and the dash?
Hello, I am sending a GET request using ?include=request_type. On my class I have created a variable called requestType: Resource? and in the fieldsFromDictionary I have set "requestType": ToOneRelationship(RequestType.self) The RequestType class has a resourceType of "request-types".
In the include I am using the "requestType"
The JSON which I am receiving contains the request-type with dash and not underscore. As a result I get no value for the requestType variable.
Finally I have used the UnderscoredKeyFormatter.
The main issue is that the include in the url contains an underscore while the key contains a dash.
How can I overcome this type of issue with the underscore and the dash?