Closed
Description
Schema Inaccuracy
#/components/schemas/email
is currently only referenced in response types for
- https://docs.github.com/en/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user
- https://docs.github.com/en/rest/reference/users#list-email-addresses-for-the-authenticated-user
- https://docs.github.com/en/rest/reference/users#add-an-email-address-for-the-authenticated-user
- https://docs.github.com/en/rest/reference/users#list-public-email-addresses-for-the-authenticated-user
I don't think that any of these responses permit an item of the returned array to be a string, they are all objects
The current schema is
{
"title": "Email",
"description": "Email",
"oneOf": [
{
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "octocat@github.com"
},
"primary": { "type": "boolean", "example": true },
"verified": { "type": "boolean", "example": true },
"visibility": {
"type": "string",
"example": "public",
"nullable": true
}
},
"required": ["email", "primary", "verified", "visibility"]
},
{ "type": "string" }
]
}
Expected
{
"title": "Email",
"description": "Email",
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "octocat@github.com"
},
"primary": { "type": "boolean", "example": true },
"verified": { "type": "boolean", "example": true },
"visibility": {
"type": "string",
"example": "public",
"nullable": true
}
},
"required": ["email", "primary", "verified", "visibility"]
}