705 questions
Tooling
0
votes
2
replies
39
views
How can I test the reply of my JSON:API API?
I developed an API with NodeJS/Express whose standard should follow JSON:API.
Check for example this reply: https://api.denuncia-estacionamento.app/penalties/passeios
How do I test if this reply ...
0
votes
0
answers
79
views
Resolving conflicts between attributes and relationships in JsonApiSerializer
I'm working on a C# program that will integrate with Planning Center's JSON:API-compliant API (the documentation can be found here). For (de)serialization purposes, I'm using the JsonApiSerializer ...
0
votes
1
answer
131
views
Java LocalDateTime Serialized output is giving incorrect values
I am working on replacing crnk with Spring Hateos Json APi . I was getting a exception for LocalDateTime so I have used
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonDeserialize(using =...
0
votes
0
answers
35
views
Unable to call post method for Spring Hateos JSON API with relationships
I am working on using Spring Hateos Json APi as a replacement for crnk .I want to implement a post request ie to save the Book object
import static com.toedter.spring.hateoas.jsonapi.MediaTypes....
0
votes
0
answers
50
views
Spring Hateos Json APi add included to the response
I am working on using Spring Hateos Json APi as a replacement for crnk .As per the documentation. I was able to get the expected response when I retrieve a List of object ie when I did
import static ...
0
votes
1
answer
54
views
Spring Hateos Json api list deserialise issue
I am working on using Spring Hateos Json api as a replacement for crnk. As per the documentation. I was able to get the expected response when I retrieve a object ie when I did
import static com....
0
votes
1
answer
91
views
How to handle jsonapi returning empty struct for struct with false value in golang
It looks like jsonapi.Marshal returns an empty json object for a golang struct with a value that is false. I understand that a struct of zero values is considered zero, but as a caller of this API, am ...
0
votes
1
answer
32
views
What's the Accept header syntax for multiple extensions in JSON:API?
What is the syntax for a JSON:API Accept HTTP header with multiple extensions? I can't find it in the spec.
Here are some possibilities I could think of for a client that wants to use both the https://...
1
vote
2
answers
561
views
How to get Media image url link rendered in JSON:API response
I am trying to get the URL of the media image served via JSON to the frontend, but I'm unable to do so. My expected output is the following.
{
"data": {
"type": "...
0
votes
1
answer
105
views
JsonApiDotNetCore - How to filter by related object property?
Imagine I have two objects
public class OrderLine : Identifiable<Guid>
{
[HasOne]
public Order Order {get;set;}
...
// other properties
}
public class Order : Identifiable<Guid&...
1
vote
0
answers
97
views
Laravel JSON:API Create endpoint/resource(?) for calculated/computed values
I'm creating an API using Laravel with the laravel json-api package.
I'm trying to create an endpoint that will return a set of calculated values for a user. The endpoint will be returning a set of ...
1
vote
0
answers
88
views
JsonApiDotNetCore and filtering using a udf
I am using JsonApiDotNetCore, .NET Core, and EF Core on SQL Server and creating a REST project implementing the Json API standard.
I have plenty of resources (models) but one of them has some fields ...
0
votes
0
answers
74
views
Unable to set HTTP status code for Policy response (Laravel)
I'm building an API with Laravel 10 and the JSON:API library. In this app, one of the main resources (Expense) has a to-one relationship with de User model. I decided to build this application ...
1
vote
1
answer
1k
views
How can I implement multiple optional fields but with at least one of them mandatory in MyPy or Pydantic?
I'm trying to write a minimal, custom, JSON:API 1.1 implementation using Python.
For the top level, the RFC/doc says:
https://jsonapi.org/format/#document-top-level
A document MUST contain at least ...
0
votes
1
answer
194
views
Example of using "lid" in JSON:API
The spec for JSON:API v1.1 mentions that "when the resource object originates at the client and represents a new resource to be created on the server", "a lid member may be included to ...