Project: KICS (Provisioning / Security & Compliance)
File: 429b2106-ba37-43ba-9727-7f699cc611e1.md

title: Unknown Property (v2) hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 429b2106-ba37-43ba-9727-7f699cc611e1 Query name: Unknown Property (v2) Platform: OpenAPI Severity: <span style="color:#5bc0de">Info</span> Category: Structure and Semantics URL: All properties defined in OpenAPI objects should be known<br> ```json title="Positive test num. 1 - json file" hl_lines="40 20" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "summary": "List API versions", "responses": { "200": { "description": "OK" } }, "operationId": "listVersionsv2" }, "parameters": [ { "descripption": "ID of pet to use", "required": true, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "name": "id", "in": "path" } ] } }, "definitions": { "ErrorModel": { "type": "object", "required": [ "message", "code" ], "propppperties": { "message": { "type": "string" }, "code": { "type": "integer", "minimum": 100, "maximum": 600 } } } } } ``` ```json title="Positive test num. 2 - json file" hl_lines="25 7" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0", "contact": { "nameee": "contact", "url": "https://www.google.com/", "email": "user@gmail.com" } }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "taggs": [ { "name": "pets" } ] } ``` ```yaml title="Positive test num. 3 - yaml file" hl_lines="16 28" swagger: "2.0" info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: OK parameters: name: id in: path descripption: ID of pet to use required: true type: array items: type: string collectionFormat: csv definitions: ErrorModel: type: object required: message code propppperties: message: type: string code: type: integer minimum: 100 maximum: 600 ``` <details><summary>Positive test num. 4 - yaml file</summary> ```yaml hl_lines="17 6" swagger:

info: title: Simple API Overview version: 1.0.0 contact: nameee: "contact" url: "https://www.google.com/" email: "user@gmail.com" paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response taggs: name: pets ``` </details> ```json title="Negative test num. 1 - json file" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "summary": "List API versions", "responses": { "200": { "description": "OK" } }, "operationId": "listVersionsv2" }, "parameters": [ { "description": "ID of pet to use", "required": true, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "name": "id", "in": "path" } ] } }, "definitions": { "ErrorModel": { "type": "object", "required": [ "message", "code" ], "properties": { "message": { "type": "string" }, "code": { "type": "integer", "minimum": 100, "maximum": 600 } } } } } ``` ```json title="Negative test num. 2 - json file" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0", "contact": { "name": "contact", "url": "https://www.google.com/", "email": "user@gmail.com" } }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } } } } }, "tags": [ { "name": "pets" } ] } ``` ```yaml title="Negative test num. 3 - yaml file" swagger: "2.0" info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: OK parameters: name: id in: path description: ID of pet to use required: true type: array items: type: string collectionFormat: csv definitions: ErrorModel: type: object required: message code properties: message: type: string code: type: integer minimum: 100 maximum: 600 ``` <details><summary>Negative test num. 4 - yaml file</summary> ```yaml swagger: "2.0" info: title: Simple API Overview version: 1.0.0 contact: name: "contact" url: "https://www.google.com/" email: "user@gmail.com" paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response tags: name: pets ``` </details>