Skip to content

Inconsistent swagger description with implementation #1018

@te-koyanagi

Description

@te-koyanagi

Issue/Feature Description:
Found an inconsistentency in the swagger description with implementation (openapi-spec/swagger.yaml)

Why this issue to fixed / feature is needed(give scenarios or use cases):
It must be correct for better user experience as no API document exists other than this swagger description.

How to reproduce, in case of a bug:
Storage not found errors for the name "access-infos" and "snmp-configs" were returned for the following two APIs.

curl -s -X GET http://192.168.231.101:31000/v1/storages/access-infos
{
  "error_code": "StorageNotFound",
  "error_msg": "Storage access-infos could not be found.",
  "error_args": [
    "access-infos"
  ]
}

curl -s -X GET http://192.168.231.101:31000/v1/storages/snmp-configs
{
  "error_code": "StorageNotFound",
  "error_msg": "Storage snmp-configs could not be found.",
  "error_args": [
    "snmp-configs"
  ]
}

Following two APIs work as expected, but not in the swagger.yaml.

curl -s -X GET http://192.168.231.101:31000/v1/access-infos
{
  "access_infos": [
    {
      "created_at": "2024-01-26T04:48:40.545605",
      "updated_at": null,
      "storage_id": "db6e9a64-fc7c-4c10-a60b-a17abb7fabcf",
      "storage_name": null,
      "vendor": "huawei",
      "model": "oceanstor",
      "rest": {
        "host": "172.27.16.71",
        "port": 8088,
        "username": "admin"
      },
      "ssh": {},
      "cli": {},
      "smis": {},
      "extra_attributes": {
        "path": "storage.json"
      }
    }
  ]
}

curl -s -X GET http://192.168.231.101:31000/v1/snmp-configs
{
  "snmp_configs": []
}

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions