Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent swagger description with implementation #1018

Open
te-koyanagi opened this issue Mar 1, 2024 · 1 comment
Open

Inconsistent swagger description with implementation #1018

te-koyanagi opened this issue Mar 1, 2024 · 1 comment

Comments

@te-koyanagi
Copy link

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)

@te-koyanagi
Copy link
Author

See the following document for the test configuration:
https://docs.google.com/document/d/1WesXmZV0eRDgG2cjg2myqd5BK1t-Eg36O0IzkA6BTto/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant