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]: tcgc result metadata is not being extracted correctly #1985

Open
4 tasks done
qiaozha opened this issue Dec 13, 2024 · 1 comment · May be fixed by #2004
Open
4 tasks done

[Bug]: tcgc result metadata is not being extracted correctly #1985

qiaozha opened this issue Dec 13, 2024 · 1 comment · May be fixed by #2004
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@qiaozha
Copy link
Member

qiaozha commented Dec 13, 2024

Describe the bug

For this tsp

@error
model Error {
    code: int32;
    message: string;
}
 
@pagedResult
model Bar {
    @items
    lists: string[];
    @TypeSpec.nextLink
    nextLink: string;
}
 
model Child extends Bar {
    message: string
}
 
@post
op test(): Error | Child; 

the itemsSegments and nextLinkSegments are correct, but the method.nextLinkPath and method.response.resultPath is empty string.
Image

Reproduction

N/A

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the TypeSpec repo
  • Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@qiaozha qiaozha added bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Dec 13, 2024
@tadelesh tadelesh self-assigned this Dec 13, 2024
@tadelesh
Copy link
Member

it is a bug for tcgc to handling page result with inheritance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
2 participants