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

[Bug]: current PagingOperation output does not support pageable decorator in nested properties #5208

Open
4 tasks done
tadelesh opened this issue Nov 27, 2024 · 4 comments
Open
4 tasks done
Assignees
Labels
bug Something isn't working needs-area

Comments

@tadelesh
Copy link
Member

Describe the bug

for the following tsp, i got a compiler error to say list operation does not contain page items. also, the PagingOperation from getPagingOperation could not get the correct result for such nested case.

Reproduction

     @list
      op test(): ListTestResult;
      model ListTestResult {
        results: {
          @pageItems
          values: Test[];
        };
        pagination: {
          @TypeSpec.nextLink
          nextLink: string;
        };
      }
      model Test {
        id: string;
      }

Checklist

@tadelesh tadelesh added the bug Something isn't working label Nov 27, 2024
@tadelesh tadelesh changed the title [Bug]: current PagingOperation output does not support nested property [Bug]: current PagingOperation output does not support nested pageable decorator Nov 27, 2024
@tadelesh tadelesh changed the title [Bug]: current PagingOperation output does not support nested pageable decorator [Bug]: current PagingOperation output does not support pageable decorator in nested properties Nov 27, 2024
@tadelesh
Copy link
Member Author

Another two things:

  1. how to deal with operation return array directly?
  2. could the core export all the isXXX for paging?

@markcowl markcowl added the needs-info Mark an issue that needs reply from the author or it will be closed automatically label Dec 2, 2024
@markcowl
Copy link
Contributor

markcowl commented Dec 2, 2024

@tadelesh Can you include details of the error, I suspect this may be an emitter-specific error

@tadelesh
Copy link
Member Author

tadelesh commented Dec 3, 2024

refer this playground. current paging does not support nested @pageItems or @nextLink. it will report error and i could not get correct info from getPagingOperation.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-info Mark an issue that needs reply from the author or it will be closed automatically label Dec 3, 2024
@lmazuel
Copy link
Member

lmazuel commented Dec 11, 2024

@lirenhe @tadelesh I'm removing the E2E label, since we updated the TypeSpec to avoid this issue

@lmazuel lmazuel removed the 1_0_E2E label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

3 participants