-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The Go module generated from a schema property like this:
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "date-time"
}
}
is missing the import time statement and won't compile.
openapi-generator version
OpenAPI declaration file content or url
"/api/v2/Configuration/LatestConfigDates": {
"get": {
"tags": [
"Configuration"
],
"summary": "Get the latest config update times for each application running on a role.",
"parameters": [
{
"name": "roleId",
"in": "query",
"description": "The role to get latest config dates for",
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "date-time"
}
}
},
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "date-time"
}
}
},
"text/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "date-time"
}
}
}
}
},
"500": {
"description": "Server Error"
}
}
}
},-->
Generation Details
openapi-generator generate -g go -i api.yaml -o go/
Steps to reproduce
Related issues/PRs
Suggest a fix
Reactions are currently unavailable