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

When multiple MULTIGET endpoints exist, pagination model is shared #178

Closed
JacobCrofts opened this issue Feb 2, 2021 · 2 comments
Closed
Labels
bug Something isn't working Medium Priority

Comments

@JacobCrofts
Copy link

JacobCrofts commented Feb 2, 2021

Medium priority, because a workaround exists.

Describe The Bug

When more than one MULTIGET endpoint exists, the _pagination object is shared between the generated Swagger models. This is a problem because:

  • the pagination object's class name is tied to one of the models (for example, given Dog and Cat resources with MULTIGETs, it may be called DogMultiResponsePagination for both resources)
  • the class name is subject to change when new MULTIGET endpoints are added (for example, if we add a new Parrot resource with a MULTIGET, now the class may be called ParrotMultiResponsePagination for all three resources)

This forces the developer to change the class name as new features are added. The bug is that we are defining _pagination inline in the Swagger resource, whereas it should be a separate schema.

This issue is a close relative of #176.

To Reproduce

create any two resources with MULTIGET endpoints, generate Java code, observe class name

Expected Behavior

We should have a separate "pagination" object for each resource that needs one (DogMultiResponsePagination, CatMultiResponsePagination).

Reslang Version

5.1.1

@njaczko
Copy link
Contributor

njaczko commented Mar 2, 2021

Resolved by #181

@njaczko njaczko closed this as completed Mar 2, 2021
@njaczko
Copy link
Contributor

njaczko commented Mar 2, 2021

This issue was also discussed in slack: https://liveramp.slack.com/archives/CPBAEKS9X/p1612976567104700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Medium Priority
Projects
None yet
Development

No branches or pull requests

2 participants