Skip to content

Instantly share code, notes, and snippets.

@Grohden
Created November 26, 2020 03:07
Show Gist options
  • Save Grohden/13d012470a9860f3dc26c219c4674361 to your computer and use it in GitHub Desktop.
Save Grohden/13d012470a9860f3dc26c219c4674361 to your computer and use it in GitHub Desktop.
Big treta com o openapi-generator
{
"openapi": "3.0.0",
"info": {
"title": "Foo",
"description": "Foo",
"version": "1.0",
"contact": {}
},
"tags": [],
"servers": [],
"components": {},
"paths": {
"/health": {
"get": {
"operationId": "HealthController_check",
"parameters": [],
"responses": {
"200": {
"description": "The Health Check is successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "ok"
},
"info": {
"type": "object",
"example": {
"database": {
"status": "up"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"nullable": true
},
"error": {
"type": "object",
"example": {},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"nullable": true
},
"details": {
"type": "object",
"example": {
"database": {
"status": "up"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
},
"503": {
"description": "The Health Check is not successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "error"
},
"info": {
"type": "object",
"example": {
"database": {
"status": "up"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"nullable": true
},
"error": {
"type": "object",
"example": {
"redis": {
"status": "down",
"message": "Could not connect"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
},
"nullable": true
},
"details": {
"type": "object",
"example": {
"database": {
"status": "up"
},
"redis": {
"status": "down",
"message": "Could not connect"
}
},
"additionalProperties": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment