Azure / Azure/azure-rest-api-specs

Swagger ModelValidation erroneously fails when required x-ms-secret properties are omitted from responses in examples

Open
#20,235 4 comments 0 reactions 1 assignee Claimed by @ankhyk View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

From the [x-ms-secret documentation](https://github.com/Azure/autorest/tree/main/docs/extensions#x-ms-secret):

> When a property is modeled as both "required" and "x-ms-secret": true, which means that this property must not exist in the response but has to be present in request.

The Swagger ModelValidation pipeline fails for this scenario, erroneously flagging properties that match this scenario that are missing from example responses as errors, e.g.:
https://github.com/Azure/azure-rest-api-specs/pull/18645/checks?check_run_id=6586657182

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.