Skip to content

BindZone fields are of incorrect type #653

@sponte

Description

@sponte

Describe the bug
The refresh, retry, expire and minimum fields are currently defined as IntegerFields, but in reality, bind supports tokens such as 2h, 4d and so on, and therefore integer conversion does not work.

To Reproduce
Try to create any zone using /api/v2/services/bind/zone endpoint.

Expected behavior
The zone gets created

Screenshots or Response
The API responds with invalid field type error:

│ Error: unexpected response code '500': {"code":500,"status":"internal server error","response_id":"INTEGER_FIELD_WITH_NON_INTEGER_INTERNAL_VALUE","message":"Cannot parse IntegerField `refresh` from internal because its internal value is not\n                    a numeric value. Consider changing this field to a StringField.","data":[]}

pfSense Version & Package Version:

  • pfSense Version: [e.g. pfSense 2.7.2]
  • Package Version [e.g. v2.3.2]

Affected Endpoints:

  • URL: [e.g. /api/v2/sevices/bind]

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeRequires changes that may breaking existing usageenhancementIssues or PRs that enhance existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions