Skip to content

EnterpriseUpdateBudget has fields that are no longer in the "Update a budget" request schema #4698

Open

Description

@JamBalaya56562

The request body schema of "Update a budget" (PATCH /enterprises/{enterprise}/settings/billing/budgets/{budget_id}) no longer has budget_scope, budget_entity_name, budget_type, and budget_product_sku. The OpenAPI description at 066b825d (picked up by #4693) only has budget_alerting, budget_amount, expires_at, and prevent_further_usage, while the previous one at 642960c3 also had the four removed properties and user.

EnterpriseUpdateBudget still has the four fields, so since #4693 script/check-schema-fields.sh reports them on master:

WARN  github/enterprise_budgets.go:115: EnterpriseUpdateBudget.BudgetScope: Go field is not in the request body schema of any of its 1 operation(s)
WARN  github/enterprise_budgets.go:116: EnterpriseUpdateBudget.BudgetEntityName: Go field is not in the request body schema of any of its 1 operation(s)
WARN  github/enterprise_budgets.go:117: EnterpriseUpdateBudget.BudgetType: Go field is not in the request body schema of any of its 1 operation(s)
WARN  github/enterprise_budgets.go:118: EnterpriseUpdateBudget.BudgetProductSKU: Go field is not in the request body schema of any of its 1 operation(s)

Also, both budget request types are missing properties that are in the schema:

  • EnterpriseCreateBudget has no user (required when budget_scope is user) and no expires_at.
  • EnterpriseUpdateBudget has no expires_at.

I have a fix ready and will open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions