Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
110 stars 172 forks source link

Validation is saying a required property (parameter) is missing even though its there #4420

Open heaths opened 1 year ago

heaths commented 1 year ago

I'm getting an OBJECT_MISSING_REQUIRED_PROPERTY error on a sample for "api-version" despite the fact it's there in the sample and spelled correctly.

Based on https://github.com/Azure/azure-rest-api-specs/pull/21123#issuecomment-1279184922, I tried changing the order (as you can see from the permalink above) but still got the error.

This becomes a blocker with no clear resolution.

raych1 commented 1 year ago

@heaths , the real issue is in example the scope parameter should not have slash as value because api path in swagger already have the prefix '/'.

I will log a bug to report this 'double slash' issue.

heaths commented 1 year ago

It's a valid parameter, and "//" should be canonicalized as "/" anyway, which it does on the backend as well as most clients I've tested. If you're logging an issue on the validation, great. This is not really a bug in the swagger. "/" is indeed a valid scope, which would result in "//" until canonicalized.

raych1 commented 1 year ago

This is planned in sprint of Dec.

raych1 commented 1 year ago

This is resolved in PR

heaths commented 1 year ago

This is resolved in PR

Closing

heaths commented 1 year ago

Seems to be happening again in Azure/azure-rest-api-specs#25042

konrad-jamrozik commented 1 year ago

Assigned @scbedd per: