Skip to content

Add servicesJsonRoute option and remove unneeded dependency #99

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

Merged

Conversation

Vincentdevreede
Copy link
Contributor

@Vincentdevreede Vincentdevreede commented May 13, 2025

  • Feature: Introduced the servicesJsonRoute option to control the exposure of service documentation.
  • Chore: Removed unneeded @polka/send-type dependency

💻 Code example:

const server = gateway({
  servicesJsonRoute: false, // optional, default value: true
  routes: [
    {
      prefix: '/service',
      target: 'http://127.0.0.1:3000',
    },
  ],
})

ℹ️ Note:
I used version number 4.2.0 in the documentation, assuming that will be the next release version. Please let me know if a different version is used.

@Vincentdevreede Vincentdevreede changed the title Add servicesJsonRoute option and remove unused dependency Add servicesJsonRoute option and remove unneeded dependency May 13, 2025
@jkyberneees jkyberneees requested a review from Copilot May 14, 2025 19:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new option to control the exposure of service documentation via a JSON route and removes an unneeded dependency.

  • Added a new servicesJsonRoute option with a default value of true in gateway configuration.
  • Replaced the usage of @polka/send-type with a built‐in response method for serving /services.json.
  • Updated documentation to reflect the new option and version changes.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Removed the unneeded @polka/send-type dependency.
index.js Added servicesJsonRoute option and updated the JSON route handler.
docs/README.md Updated documentation to include the new servicesJsonRoute option.

@jkyberneees jkyberneees merged commit b6d85ee into BackendStack21:master May 15, 2025
1 check passed
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.

2 participants