Project

General

Profile

Actions

Bug #1570

closed

API: Wrong type signature in OpenApi

Added by Eugen Hotwagner over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
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"}
                }
}
}
},
Actions #1

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Bernhard Koschiček-Krombholz over 3 years 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" 
  }
]

Actions #3

Updated by Alexander Watzinger over 3 years ago

  • Found in version changed from to 6.4.1
Actions #4

Updated by Alexander Watzinger over 3 years ago

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

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Target version changed from 208 to 6.5.0
Actions

Also available in: Atom PDF