Skip to content

OpenAPI Spec / Documentation inaccurate #10328

Open
@jk1ng

Description

@jk1ng

Snipe-IT Version

5.1.8

Operating System

Ubuntu

Web Server

Docker

PHP Version

N/A

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Hi!

The current OpenAPI v3 spec that is released on https://snipe-it.readme.io/openapi/ could be improved:

  1. Ideally, the spec should be included on the actual server (e.g., /api/v1/openapi.v3.json or something to that effect), and ideally generated from code (I'm not familiar with Laravel and how much of a pain that might be)
  2. Some of the API documentation does not match up with the actual functionality. For example, fields and fieldsets ( Issue Creating custom fields (NOT FieldSets) via the API #8311 )

This would also generally improve QoL for integrators e.g., with issues such as #7900 and #9932 which were closed but could be argued as unaddressed at the time.

I'm not sure if this is automatically included in the upcoming v6 release, but I didn't see it mentioned (or screenshotted) in the roadmap:
https://grokstar.dev/news/snipeit-releases/2021/07/snipe-it-v6-roadmap/

-- so my hope is that by raising this now, maybe this is something that can be prioritized at some point for v6.

Thanks!

Describe the solution you'd like A clear and concise description of what you want to happen.

  1. OpenAPI v3 JSON spec should be generated at first install/setup time, from the actual code, and cached on the server at an endpoint such as /api/v1/openapi.v3.json
  2. Documentation for the API should better match actual API behavior

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

No response

Additional context Add any other context or screenshots about the feature request here.

I'm not sure what the current quality is for Laravel <-> OpenAPI spec generators, but it seems that there are a few open source projects that are out there which do this. In the Python world, one of them which works really well is https://flask-restx.readthedocs.io/en/latest/ -- maybe something to this effect can be used to auto-generate the spec on the server for v6?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions