Skip to content

The Copilot Seat Billing API response for the assignee type can be "null" #3616

@beryl-factset

Description

@beryl-factset

There is a bug in the copilot seat details, per the spec null is a valid response type for the assignee:

          "assignee": {
            "anyOf": [
              {
                "type": "null"
              },

https://docs.github.com/en/rest/copilot/copilot-user-management?apiVersion=2022-11-28#list-all-copilot-seat-assignments-for-an-organization

However, the code here errors with
Code:

type CopilotSeatDetails struct {

if v["type"] == nil {

it's getting tested here and expecting an error, as invalid json.
This test checks for nil type, and returns an error, it should pass.

name: "Invalid JSON",

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions