{
    "openapi": "3.0.3",
    "info": {
        "title": "Update Race Non-Binary Gender Support",
        "description": "Enable or disable non-binary gender support.",
        "version": "1.0.0",
        "contact": {
            "name": "RunSignup API Support",
            "url": "https://runsignup.com/API",
            "email": "info@runsignup.com"
        }
    },
    "servers": [
        {
            "url": "https://api.runsignup.com/rest",
            "description": "Production API Server"
        }
    ],
    "tags": [
        {
            "name": "Basic Race Information",
            "description": "APIs related to Basic Race Information"
        }
    ],
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "string",
                        "description": "Error message"
                    },
                    "details": {
                        "type": "object",
                        "description": "Additional error details",
                        "additionalProperties": true
                    }
                },
                "required": [
                    "error"
                ]
            },
            "BadRequestError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating invalid request parameters or structure"
                    }
                ]
            },
            "UnauthorizedError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating authentication failure"
                    }
                ]
            },
            "ForbiddenError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating the authenticated user lacks required permissions"
                    }
                ]
            },
            "NotFoundError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating the requested resource does not exist"
                    }
                ]
            },
            "ServerError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating an unexpected server-side issue"
                    }
                ]
            },
            "V2RaceGenderSettingsNonbinarySupportPostResponse": {
                "type": "object",
                "title": "Gender Support Response",
                "description": "Response indicating whether nonbinary gender options are supported",
                "properties": {
                    "supports_nonbinary": {
                        "type": "string",
                        "description": "Indicates whether nonbinary gender options are supported (T) or not supported (F)",
                        "example": "T",
                        "enum": [
                            "T",
                            "F"
                        ]
                    }
                },
                "required": [
                    "supports_nonbinary"
                ]
            }
        },
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "query",
                "name": "api_key",
                "description": "RunSignup API Key"
            },
            "apiSecret": {
                "type": "apiKey",
                "in": "query",
                "name": "api_secret",
                "description": "RunSignup API Secret"
            }
        }
    },
    "paths": {
        "/v2/race-gender-settings/nonbinary-support.json": {
            "post": {
                "tags": [
                    "Basic Race Information"
                ],
                "summary": "Update Race Non-Binary Gender Support",
                "description": "Enable or disable non-binary gender support.",
                "operationId": "v2_race_gender_settings_nonbinary_support_json",
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "query",
                        "description": "Race ID.",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "description": "Race API key.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "api_secret",
                        "in": "query",
                        "description": "Race API secret.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "security": [
                    {
                        "apiKey": [],
                        "apiSecret": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Gender Support Response - Response indicating whether nonbinary gender options are supported",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/V2RaceGenderSettingsNonbinarySupportPostResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BadRequestError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UnauthorizedError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ForbiddenError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFoundError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ServerError"
                                }
                            }
                        }
                    }
                },
                "x-permissions": [
                    "affiliates",
                    "partners",
                    "race_directors",
                    "timers"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "supports_nonbinary": {
                                        "type": "boolean",
                                        "enum": [
                                            "T",
                                            "F"
                                        ]
                                    }
                                },
                                "required": [
                                    "supports_nonbinary"
                                ]
                            }
                        }
                    }
                }
            }
        }
    }
}