Re: [webauthn] `CredentialRequestOptions` make otherwise valid values invalid in an undesirable way

>So far we have two specs trying to do it: webauthn and some proposals for webrtc.  So no, it's not very common.  Maybe because `required` is somewhat new?

Ah, ok. Though I wasn't thinking only about specs, but also API design in a broader sense. For example, I've worked in a project where we used [JSON schema][json-schema] to declare an API where these kinds of required members nested in optional members were quite frequent. It seems to me like a very natural thing to do with a language as expressive as JS literals are - and if people do it in APIs I think they'll expect it to work the same in specs. So if this is a new feature I imagine that this usage will only grow more common over time.

[json-schema]: http://json-schema.org/latest/json-schema-core.html

-- 
GitHub Notification of comment by emlun
Please view or discuss this issue at https://github.com/w3c/webauthn/issues/750#issuecomment-401947387 using your GitHub account

Received on Monday, 2 July 2018 21:44:23 UTC