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

Defect: openapi uses camel case instead of snake case #264

Closed
ashcherbakov opened this issue Mar 1, 2022 · 1 comment
Closed

Defect: openapi uses camel case instead of snake case #264

ashcherbakov opened this issue Mar 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working size: S
Projects

Comments

@ashcherbakov
Copy link
Contributor

ashcherbakov commented Mar 1, 2022

The current openapi (automatically generated by https://github.com/tendermint/starport) uses camel case in all requests and response, while snake case is expected in most of the cases in DCL.

We need to fix that, so that openapi matches the real query format.

Acceptance Criteria

  • Fix openapi to match the real content
  • Extend DEV docs mentioning how to generate openapi properly
  • [Optional] Investigate why starport generates the code like this.

Example of the issue
For API /dcl/model/models/31/100

{
    "model": {
        "vid": 31,
        "pid": 100,
        "device_type_id": 1,
        "product_name": "DEMO",
        "product_label": "DEMO",
        "part_number": "DEMO001",
        "commissioning_custom_flow": 0,
        "commissioning_custom_flow_url": "",
        "commissioning_mode_initial_steps_hint": 0,
        "commissioning_mode_initial_steps_instruction": "",
        "commissioning_mode_secondary_steps_hint": 0,
        "commissioning_mode_secondary_steps_instruction": "",
        "user_manual_url": "",
        "support_url": "",
        "product_url": "",
        "lsf_url": "",
        "lsf_revision": 0,
        "creator": "cosmos1clsrmjxx07k9u70wgem3q9ve9s978adgmhnt0m"
    }
}

But openapi show the following:
https://zigbee-alliance.github.io/distributed-compliance-ledger/?urls.primaryName=DCL#/Query/ZigbeeallianceDistributedcomplianceledgerModelModel

{
  "model": {
    "vid": 0,
    "pid": 0,
    "deviceTypeId": 0,
    "productName": "string",
    "productLabel": "string",
    "partNumber": "string",
    "commissioningCustomFlow": 0,
    "commissioningCustomFlowUrl": "string",
    "commissioningModeInitialStepsHint": 0,
    "commissioningModeInitialStepsInstruction": "string",
    "commissioningModeSecondaryStepsHint": 0,
    "commissioningModeSecondaryStepsInstruction": "string",
    "userManualUrl": "string",
    "supportUrl": "string",
    "productUrl": "string",
    "lsfUrl": "string",
    "lsfRevision": 0,
    "creator": "string"
  }
}
@ashcherbakov ashcherbakov added this to the v0.7: Main Net Launch milestone Mar 1, 2022
@ashcherbakov ashcherbakov added this to Backlog in DCL via automation Mar 1, 2022
@ashcherbakov ashcherbakov added bug Something isn't working size: S labels Mar 1, 2022
@ashcherbakov ashcherbakov moved this from Backlog to To do in DCL Mar 1, 2022
@ashcherbakov ashcherbakov moved this from To do to In progress in DCL Mar 1, 2022
@uabjabborov uabjabborov moved this from In progress to In Review in DCL Mar 5, 2022
@ashcherbakov
Copy link
Contributor Author

Fixed in #276

DCL automation moved this from In Review to Done Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size: S
Projects
No open projects
DCL
  
Done
Development

No branches or pull requests

2 participants