Project

General

Profile

Bug #1570

API: Wrong type signature in OpenApi

Added by Eugen Hotwagner about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Low
Category:
API
Target version:
Start date:
2021-09-09
Estimated time:
Found in version:

Description

Methods returning arrays are typed as single object and not as an array of that object. For example:

"summary": "Class Mapping endpoint\r",
"description": "Provides a list of all available system classes, their CIDOC CRM mapping, which view they belong, which icon is used and the englisch name",
"responses": {
"200": {
"description": "List of all available system classes",
"content": {
"application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassMappingModel" 
                }
}
}
},

should be:

"summary": "Class Mapping endpoint\r",
"description": "Provides a list of all available system classes, their CIDOC CRM mapping, which view they belong, which icon is used and the englisch name",
"responses": {
"200": {
"description": "List of all available system classes",
"content": {
"application/ld+json": {
                "schema": {
                  "type" :"array",
                  "items": {"$ref": "#/components/schemas/ClassMappingModel"}
                }
}
}
},

History

#1

Updated by Bernhard Koschiček-Krombholz about 1 month ago

  • Status changed from New to In Progress
#2

Updated by Bernhard Koschiček-Krombholz about 1 month ago

  • Status changed from In Progress to Closed

Thank you very much for reporting. I changed it:

  /api/0.2/classes/:
    get:
      description: 'Provides a list of all available system classes, their CIDOC CRM mapping, which view they belong, which icon is used and the englisch name'
      responses:
        '200':
          content:
            application/ld+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClassMappingModel'

Example output is:

[
  {
    "crmClass": "string",
    "en": "string",
    "icon": "string",
    "systemClass": "string",
    "view": "string" 
  }
]

#3

Updated by Alexander Watzinger about 1 month ago

  • Found in version changed from API to 6.4.1
#4

Updated by Alexander Watzinger about 1 month ago

  • Subject changed from Wrong type signature in OpenApi to API: Wrong type signature in OpenApi
#5

Updated by Bernhard Koschiček-Krombholz about 1 month ago

  • Target version changed from API to 6.5.0

Also available in: Atom PDF