Skip to content

Question: POST /rest/v1/distributionsets clarifications #2745

@fkromer

Description

@fkromer

MgmtDistributionSetRequestBodyPost does not define at least one required property and no default values applied implicitly if not passed explicitly schema wise. The example in the schema is:

[
  {
    "name": "dsOne",
    "description": "Description of the distribution set.",
    "version": "1.0.0",
    "locked": true,
    "requiredMigrationStep": false,
    "modules": [
      {
        "id": 108
      }
    ],
    "type": "test_default_ds_type"
  }
]

If I create a distribution set with the following request body (code wise the name and version are the only required props)

{
    "name": "ds1",
    "version": "1.0.0"
}

I get a response containing

        "name": "ds1",
        "id": 1,
        "version": "1.0.0",
        "type": "os_app",
        "typeName": "OS with app(s)",
        "complete": false,
        "locked": false,
        "deleted": false,
        "valid": true,
        "requiredMigrationStep": false,

which answers the question about implicit default values.

The lack of the info about required props and description about how complete, locked, deleted, valid work in the openapi spec schema is not critical. It implies the need for implicit knowledge however which makes working with the API pretty difficult. If someone knows about the behavior still involved in the project: Would it be possible to add this info into the related code (the openapi spec is generated from). I have guesses only...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions