Skip to content

API documentation for Parameter is incomplete #1205

@Mayerch1

Description

@Mayerch1

Describe the bug
The API documentation for POSTing a new Parameter under https://domain/api#/Parameter/api_parameters_post appears to be incomplete.

The provided schema is missing the mandatory reference to the owning element:
element* > iri-reference.

I assume this is not intended, as the mandatory reference to the owning element is documented for other endpoints (e.g. Orderdetail, Pricedetail).

I failed to locate the source of the API documentation so I couldn't create a pull request and am reporting this as an issue instead.

Server Side

  • Part-DB Version: 2.5.0 / docker
  • PHP Version: 8.4.17 (SAPI: fpm-fcgi)
  • Database Server 12.1.2-MariaDB-ubu2404

Additional Information

This is the error when missing the element reference

{
  "@context": "/api/contexts/Error",
  "@id": "/api/errors/400",
  "@type": "hydra:Error",
  "detail": "Syntax error",
  "status": 400,
  "type": "/errors/400",
  "hydra:description": "Syntax error",
  "hydra:title": "An error occurred"
}

Here is a working request body, including the reference to the owning part

{
    "symbol": "R",
    "value_typical": 2940,
    "unit": "Ohm",
    "name": "Resistance",
    "element": "/api/parts/1003"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions