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

nextLink property should not be marked readOnly: true #418

Closed
mikekistler opened this issue Mar 13, 2024 · 5 comments
Closed

nextLink property should not be marked readOnly: true #418

mikekistler opened this issue Mar 13, 2024 · 5 comments
Milestone

Comments

@mikekistler
Copy link
Member

A recent change in TypeSpec Azure adds readOnly: true to the nextLink property in a pageable list response.

readOnly: true is meaningless on a property of a response-only schema, and pageable list responses are always response-only -- they are never part of a request body.

We should not be including meaningless attributes in the OpenAPI that is generated from TypeSpec.

@jiaosummer
Copy link

Github PR - https://github.com/Azure/azure-rest-api-specs-pr/pull/17181

Currently ran npx tsv specification\standbypool\StandbyPool.Management will add readOnly": true to nextLink property. Otherwise, the typespec validation fails and show the errors as in- https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3588838&view=logs&j=011e1ec8-6569-5e69-4f06-baf193d1351e&t=0f4aa080-c997-58ca-481c-4930865ae0f8

Please help us to unblock. thanks

@markcowl
Copy link
Member

@mario-guerra There is a current discussion about this with differing opinions, can you coordinate coming to consensus?

@mikekistler
Copy link
Member Author

mikekistler commented Mar 22, 2024

UPDATE

you can tweak between readOnly:true​ or no readOnly​ at spec level with
@@visibility(Azure.Core.Page.nextLink)​ for ARM
@@visibility(Azure.Core.CustomPage.nextLink)​ for Azure.Core.


Capturing a workaround shared in email:

There is a one-line change to a spec that will update the visibility of these types across the whole spec:

@@visibility(Azure.Core.Page.nextLink)​

as shown in this playground

@mario-guerra
Copy link
Member

@mikekistler can this issue be closed?

@mikekistler
Copy link
Member Author

Fixed by #549

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

4 participants