🐛 Describe the Bug
GetSlotsSuccessfulResponseDto generates code that is not useful.
See:
|
"GetSlotsSuccessfulResponseDto": { |
|
"type": "object", |
|
"properties": { |
|
"_dates_": { |
|
"$ref": "#/components/schemas/SlotsSchema" |
|
} |
|
}, |
|
"required": [ |
|
"_dates_" |
|
] |
|
}, |
Whilst using oapi v3.0 can we add additionalProperties and set it to true so the generated code allows us to handle this better.
Example:
"GetSlotsSuccessfulResponseDto": {
"type": "object",
"additionalProperties": true,
"properties": {
"_dates_": {
"$ref": "#/components/schemas/SlotsSchema"
}
},
"required": [
"_dates_"
]
},
Or, if you're ok to bump to oapi v3.1 we can make it use
Example:
"GetSlotsSuccessfulResponseDto": {
"type": "object",
"patternProperties": {
"^[0-9]{4}-[0-9]{2}-[0-9]{2}$": {
"type": "object",
"properties": {
"slots": {
"type": "array",
"items": {
"type": "string",
"format": "date-time"
}
}
},
"required": [
"slots"
]
}
}
},
Let me know if this is something we can progress with.
📍 API Endpoint
/calendars/{calendarId}/free-slots
✅ Expected Behavior
A type was generated that is easy to work with.
💻 Screenshots or Code Samples
A generated Go snippet where the key is expected to be _dates_.
type GetSlotsSuccessfulResponseDto struct {
UnderscoreDates SlotsSchema `json:"_dates_"`
}
It would at least be better to add additional properties to have the following:
type GetSlotsSuccessfulResponseDto struct {
UnderscoreDates SlotsSchema `json:"_dates_"`
AdditionalProperties map[string]interface{} `json:"-"`
}
This would be we can use the additional properties.
Product Area
calendars
📋 Use Case
List availability from a calendar.
🚨 Why Should This Be Prioritized?
It's a nice to have.
🧠 Additional Context
No response
🐛 Describe the Bug
GetSlotsSuccessfulResponseDtogenerates code that is not useful.See:
highlevel-api-docs/apps/calendars.json
Lines 3747 to 3757 in eeabad6
Whilst using oapi v3.0 can we add
additionalPropertiesand set it to true so the generated code allows us to handle this better.Example:
Or, if you're ok to bump to oapi v3.1 we can make it use
Example:
Let me know if this is something we can progress with.
📍 API Endpoint
/calendars/{calendarId}/free-slots
✅ Expected Behavior
A type was generated that is easy to work with.
💻 Screenshots or Code Samples
A generated Go snippet where the key is expected to be
_dates_.It would at least be better to add additional properties to have the following:
This would be we can use the additional properties.
Product Area
calendars
📋 Use Case
List availability from a calendar.
🚨 Why Should This Be Prioritized?
It's a nice to have.
🧠 Additional Context
No response