Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint tag ordering #11

Merged
merged 1 commit into from
Jun 8, 2022
Merged

Endpoint tag ordering #11

merged 1 commit into from
Jun 8, 2022

Conversation

jlalmes
Copy link
Owner

@jlalmes jlalmes commented Jun 8, 2022

Endpoint tag ordering

Enables you to supply the generateOpenApiDocument function with tags: string[] so that endpoint tag groups will be ordered from first-to-last.

Example

const openApiDocument = generateOpenApiDocument(appRouter, {
  title: 'Example REST API',
  version: '1.0.0',
  baseUrl: 'http://localhost:3001/api',
+  tags: ['auth', 'users', 'posts'],
});

Breaking change

Change to OpenApiMeta.

.query('getUser', {
-  meta: { ..., tags: ['users'] },
+  meta: { ..., tag: 'users' },
  ...
})

@jlalmes jlalmes merged commit 7051c5c into v0.1.0 Jun 8, 2022
@jlalmes jlalmes deleted the feat/order-tags branch August 25, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant