Update api.tsx to handle content type (#573)

* Update api.tsx to handle content type

* Update API pages with v0.64.1

---------

Co-authored-by: netbirddev <dev@netbird.io>
This commit is contained in:
Maycon Santos
2026-01-23 20:05:08 +01:00
committed by GitHub
parent 906e6c88bd
commit 4d5843df12
5 changed files with 3466 additions and 802 deletions

View File

@@ -135,7 +135,7 @@ async function gen_v3(spec: OpenAPIV3.Document, dest: string) {
}
var response = null
if(operation.responses["200"] != undefined && operation.responses["200"]["content"]["application/json"] != undefined) {
if(operation.responses["200"] != undefined && operation.responses["200"]["content"] != undefined && operation.responses["200"]["content"]["application/json"] != undefined) {
response = {
example: extractInfo(operation.responses["200"]["content"]["application/json"].schema, 'example'),
schema: extractInfo(operation.responses["200"]["content"]["application/json"].schema, 'type')