WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Why are names and descriptions discarded in Resources? #74

@DigTheDoug

Description

@DigTheDoug

https://github.com/kminami/apib2swagger/blob/22678e5bcc5712d49135dee3cf5a24c429b3c6cb/index.js#L64C30-L64C30

In looking why our docs did not retain the categorization and description fields from the resources when converted from apib to open-api-3 I noticed in this comment above that the fields are specifically being discarded for resources. I couldn't find any history that listed a reason, but I'm curious why that is the case rather than include that info? Is it because the default swagger renderer doesn't display them in a great location, just putting them in the header?

I ask mostly because I feel in some cases the info is better to have than to totally leave out, even if it's not totally great looking, but also if using the Redoc renderer it displays much better and pretty close to some apib renderers.

As it currently displays discarding those fields:

Screenshot 2023-10-16 at 11 30 21 AM

With converted json keeping resource names and descriptions:

Screenshot 2023-10-16 at 11 18 52 AM

Redoc version with converted openapi json.

Screenshot 2023-10-16 at 11 24 35 AM

Sample apib data:

Details

# Hello API Endpoints

## V1 Hello [/api/v1/hello/{?options}]
Version 1 of the Hello API provides a number of helpful endpoints for testing and debugging.

+ Parameters
    + `options`: `displayText` (string, optional) - Some display text

### query param based methods [GET]

+ Response 200 (application/json)
    + Attributes (array[Metadata])

## V2 Hello [/api/v2/hello/]

Version 2 of the Hello API aims to provide a number of helpful endpoints for testing and debugging.

### Filtering, Ordering, & Pagination

#### Filtering

This API can filter returned metadata based on provided query parameters. The following fields can be used to filter results:
- type
- identifier
- tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions