LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

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

Closed JacobCrofts closed 3 years ago

JacobCrofts commented 3 years ago

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:

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 https://github.com/LiveRamp/reslang/issues/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 commented 3 years ago

Resolved by https://github.com/LiveRamp/reslang/pull/181

njaczko commented 3 years ago

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