REST API: various null fields violate netcup-defined OpenAPI spec

  • I'm guessing there will likely be other endpoints that violate spec like this, and the API should be reviewed top to bottom.

    I'm trying to implement rdns routines:

    Code
    $ go run cmd/netcup/main.go rdns delete ...
    
    $ go run cmd/netcup/main.go rdns get ...
    Error: decode response: decode application/hal+json: decode RdnsIpv4: callback: decode field "rdns": unexpected byte 110 'n' at 8
    exit status 1

    When I look at the actual response directly:

    Code
    $ curl -s -H "Accept: application/hal+json" \
      -H "Authorization: Bearer $(go run cmd/netcup/main.go auth print-access-token)" \
      -X 'GET' \
      'https://servercontrolpanel.de/scp-core/api/v1/rdns/ipv4/...' | jq
    {
      "rdns": null
    }

    This is a problem because the OpenAPI spec does not say this is possible.

    Code
    $ jq '.components.schemas.RdnsIpv4' openapi.json
    {
      "type": "object",
      "properties": {
        "rdns": {
          "type": "string"
        }
      }
    }

    The spec is missing a nullable which you can read about here: https://swagger.io/docs/specifica…ata-types/#null

    Because the string data type is missing a nullable attribute, OpenAPI generator tools, like ogen in my case, generates:

    Code
    type RdnsIpv4 struct {
        Rdns OptString `json:"rdns"`
    }

    Which only allows this field to be a string or absent, but not null.

    2 Mal editiert, zuletzt von leee (30. November 2025 um 01:49)

  • Hi [netcup] Sarah G. - tonight I was going to work on implementing `netcup servers get ...` and `netcup servers set ...` but found another similar nullable OpenAPI spec violation:

    Code
    $ curl -s -H "Authorization: Bearer $(go run cmd/netcup/main.go auth print-access-token)" \
      "https://www.servercontrolpanel.de/scp-core/api/v1/servers/......" | jq '.serverLiveInfo.interfaces[0].vlanId'
    null

    This of course again is not deemed possible in your spec. All your endpoints should be reviewed and either the spec fixed or server behavior fixed.

    Do you already have engineers assigned to work on the various REST API bug fixes? Would it be possible to get a soft timeline on the remediation efforts?

    I will pause on my netcup CLI tool and OpenTofu (Terraform) provider work until we hear back on the state and timeline of further REST API development, and look forward to resuming when the API is actually ready for production use.

    Thank you! 🦆 (I have seen the duck emoji used in many places in the forum, what does it stand for? :) )

    2 Mal editiert, zuletzt von leee (3. Dezember 2025 um 02:26)

  • leee 3. Dezember 2025 um 02:18

    Hat den Titel des Themas von „REST API: null rdns field violates OpenAPI spec“ zu „REST API: various null fields violate netcup-defined OpenAPI spec“ geändert.
  • Thank you! 🦆 (I have seen the duck emoji used in many places in the forum, what does it stand for? :) )

    It stems from a common play on words with the German proverb "Ende gut, alles gut" ("All's well that ends well") as the German word for duck is Ente.

    Therefore, whenever users want to express the above (or something related like "case closed", "good/fair enough", "good riddance", …), they simply use the duck emoji.

    ADDENDUM: The duck has since become something of a mascot for Netcup, as users repeatedly suggested renaming Netcup to "Entcup" years ago.

    VServer IOPS Comparison Sheet: https://docs.google.com/spreadsheets/d/1w38zM0Bwbd4VdDCQoi1buo2I-zpwg8e0wVzFGSPh3iE

    4 Mal editiert, zuletzt von m_ueberall (3. Dezember 2025 um 13:43)

  • Hello leee

    thank you once again! :)

    The issue described has also been forwarded to the designated department for further review.
    As of now, we unfortunately can't provide a timeline, we kindly ask for your patience in this.

    Please feel free to get in touch with us again for an update.

    And yes, m_ueberall has explained this perfectly ^^

    Kind regards
    Sarah & the netcup team