astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
238 stars 46 forks source link

Astarte Pairing API (swagger) contains incorrect examples #907

Closed sorru94 closed 6 months ago

sorru94 commented 6 months ago

Some of the examples in the Astarte pairing API swagger contain incorrect payloads.

/{realm_name}/devices/{hw_id}/protocols/astarte_mqtt_v1/credentials

Response example is:

{
  "data": {
    "client_certificate": "..."
  }
}

While it should be:

{
  "data": {
    "client_crt": "..."
  }
}

/{realm_name}/devices/{hw_id}/protocols/astarte_mqtt_v1/credentials/verify

Request body example is:

{
  "data": {
    "client_certificate": "..."
  }
}

While it should be:

{
  "data": {
    "client_crt": "..."
  }
}

Response example is only showing the invalid case:

{
  "data": {
    "valid": false,
    "cause": "INVALID_ISSUER"
  }
}

While it should also show the valid case:

{
  "data": {
    "valid": true,
    "until": "2025-03-25 19:25:00.000Z"
  }
}
Annopaolo commented 6 months ago

Closed by #908.