Skip to content

improve endpoint naming #63

@metaforx

Description

@metaforx

For automatic schema generation, it would help to have distinctive naming per endpoint. It would help developers to know which endpoint they are actually addressing and what response to expect.

Problem
When generating clients from API endpoints using OpenAPI schema, it is really cumbersome to detect the difference between the various menu/submenu/breadcrumbs endpoints to choose from, just by number.

const { data } = cmsMenuRetrieve({
  composable: 'useFetch',
  path: {
    language: defaultLanguage,
  },
const { data } = cmsMenuRetrieve2({
  composable: 'useFetch',
  path: {
    language: defaultLanguage,
    extra_active: 999,
    extra_inactive: 999,
    from_level: 1,
    to_level: 3,
  },
Image

Solution

  • Add custom name per endpoint

Confirmation

  • Fetch schema and generate clients
  • Use an API testing tool like Bruno

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions