Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with openapi generator #976

Open
benjaminfrancois opened this issue Sep 12, 2024 · 1 comment
Open

Problem with openapi generator #976

benjaminfrancois opened this issue Sep 12, 2024 · 1 comment

Comments

@benjaminfrancois
Copy link

Hello,

I'm using this library for the first time, and it works great!
However, I've generated TypeScript Axios services for the frontend using OpenAPI Generator, and all the responses are wrapped in the PaginatedDocumented interface. I would like to retrieve the actual interface that is correctly defined in the Swagger, but it seems to be nested within a secondary object.

"responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedDocumented"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Organization"
                          }
                        },
                        "meta": {
                          "properties": {
                            "select": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "id",
                                  "name",
                                  "siret",
                                  "archivedAt",
                                  "createdAt",
                                  "updatedAt"
                                ]
                              }
                            },

I use :

  @ApiOkPaginatedResponse(Organization, ORGANIZATION_PAGINATE_OPTIONS)
  @ApiPaginationQuery(ORGANIZATION_PAGINATE_OPTIONS)

Thank's !

@Helveg
Copy link
Collaborator

Helveg commented Sep 28, 2024

Hi there, thanks for the report! Could you show both the current output, and the expected output? I believe it may be similar to what someone else was reporting here, but the author did not follow up further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants