local typedefs = require "kong.db.schema.typedefs"

return {
    name = "force-https",
    fields = {
        {consumer = typedefs.no_consumer},
        {protocols = typedefs.protocols_http}, {
            config = {
                type = "record",
                fields = {
                    {
                        status_code = {
                            type = "number",
                            default = 301,
                            one_of = {301, 302}
                        }
                    }, {
                        error_format = {
                            type = "string",
                            default = "openapi",
                            one_of = {"dataapi", "openapi", "inner"}
                        }
                    }
                }
            }
        }
    }
}
