unkey icon indicating copy to clipboard operation
unkey copied to clipboard

`EXPIRED` and `DISABLED` error codes do not include example JSON responses in Unkey Docs

Open unrenamed opened this issue 1 year ago â€ĸ 36 comments

Preliminary Checks

  • [X] I have reviewed the documentation: https://unkey.com/docs

  • [X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues

  • [X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.

Reproduction / Replay Link (Optional)

No response

Issue Summary

Currently, the Unkey documentation provides example JSON responses for various error codes, enhancing clarity for developers. However, the EXPIRED and DISABLED error codes are the only exceptions, as they do not include example JSON responses.

Was it done intentionally? If no, see the proposed solutions in the Expected behavior.

https://www.unkey.com/docs/api-reference/errors/code/EXPIRED https://www.unkey.com/docs/api-reference/errors/code/DISABLED

Steps to Reproduce

  1. Visit any of the error code documentation pages for EXPIRED or DISABLED.
  2. Compare the content on these pages with the corresponding pages for other error codes to identify the absence of JSON response examples.

Expected behavior

I propose one of the following solutions:

  • Include relevant example JSON responses for both the EXPIRED and DISABLED error codes for consistency.
  • Consider removing the existing JSON examples for other error codes if they are not essential.

Both approaches would contribute to a more uniform documentation structure.

Other information

No response

Screenshots

image image

Version info

- OS:
- Node:
- npm:

unrenamed avatar Oct 10 '24 12:10 unrenamed

/assign

2DELTA7 avatar Oct 10 '24 12:10 2DELTA7

@2DELTA7 This ticket first needs to be approved by the repo owners. The /assign command will not work without oss.gg label, fyi.

unrenamed avatar Oct 10 '24 12:10 unrenamed

/award 150

perkinsjr avatar Oct 10 '24 16:10 perkinsjr

Awarding unrenamed: 150 points đŸ•šī¸ Well done! Check out your new contribution on oss.gg/unrenamed

oss-gg[bot] avatar Oct 10 '24 16:10 oss-gg[bot]

/assign

HimanshuGaur14 avatar Oct 10 '24 17:10 HimanshuGaur14

Assigned to @HimanshuGaur14! Please open a draft PR linking this issue within 48h âš ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đŸ•šī¸ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 10 '24 17:10 oss-gg[bot]

/assign

Harshalingole avatar Oct 10 '24 17:10 Harshalingole

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 10 '24 17:10 oss-gg[bot]

/assign

tandrimab avatar Oct 10 '24 17:10 tandrimab

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 10 '24 17:10 oss-gg[bot]

/assign

jayraj-kl avatar Oct 10 '24 18:10 jayraj-kl

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 10 '24 18:10 oss-gg[bot]

/assign

Vidhanvyrs avatar Oct 11 '24 05:10 Vidhanvyrs

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 11 '24 05:10 oss-gg[bot]

Let's add examples everywhere, rather than removing. I think it helps to understand what we return

chronark avatar Oct 11 '24 12:10 chronark

My system is facing a problem while im updating the issue , i won't be able to complete it please unassign me. I'm sorry for the delay.

HimanshuGaur14 avatar Oct 12 '24 07:10 HimanshuGaur14

My system is facing a problem while im updating the issue , i won't be able to complete it please unassign me. I'm sorry for the delay.

you can unassign yourself too. Look at the top right corner or use /unassign command

DeepaPrasanna avatar Oct 12 '24 07:10 DeepaPrasanna

/unassign

HimanshuGaur14 avatar Oct 12 '24 07:10 HimanshuGaur14

Issue unassigned.

oss-gg[bot] avatar Oct 12 '24 07:10 oss-gg[bot]

/assign

joelwalice avatar Oct 12 '24 08:10 joelwalice

Assigned to @joelwalice! Please open a draft PR linking this issue within 48h âš ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đŸ•šī¸ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 12 '24 08:10 oss-gg[bot]

/assign

rajtejani avatar Oct 12 '24 11:10 rajtejani

Assigned to @rajtejani! Please open a draft PR linking this issue within 48h âš ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đŸ•šī¸ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 12 '24 11:10 oss-gg[bot]

After carefully reviewing the code it seems like the issue is not related with Docs but actually these ErrExpired and ErrDisabled response are not implemented. It can not be found on https://api.unkey.dev/openapi.json.

rajtejani avatar Oct 13 '24 09:10 rajtejani

@rajtejani ah that might be yeah if you add them here, it will add them to the openapi spec once deployed https://github.com/unkeyed/unkey/blob/main/apps/api/src/pkg/errors/openapi_responses.ts

chronark avatar Oct 13 '24 10:10 chronark

Running pnpm fmt before commiting code throw some errors of dashboard code which is not relevant to my changes. There are more then 20+ problems highlighted by linter. What should I do?

rajtejani avatar Oct 14 '24 09:10 rajtejani

/assign

Taranv8 avatar Oct 14 '24 18:10 Taranv8

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 14 '24 18:10 oss-gg[bot]

/assign

div000-321go avatar Oct 15 '24 18:10 div000-321go