question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe expected response times for responses

See original GitHub issue

I can describe expected return codes, response types and even expected responses via the spec: https://swagger.io/docs/specification/describing-responses/

What I feel is missing right now is the ability to document expected response times. As a developer, I know my endpoint should return in <100ms with a 201.

Is there a way to achieve this today (perhaps via some custom annotation?) or would this require a spec update. If so, how do I formally submit that as a request?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rafalkrupinskicommented, Nov 4, 2022

@agardnerIT OAS allows arbitrary extension fields so I don’t think you need to start a long process to change it for your particular needs.

How you support timeouts depends on your tooling. If you use a code generator to create the client code, you can add an extension field and handle it in the generator (You say you don’t want to fail the request, but I guess you’d add a warning).

If the client is coded by hand, you can either use an extension or simply the description field and let the client developer handle it in their code.

It’s also a matter of how you create the schema. If it’s generated from the server code, it also needs to support adding extension fields.

1reaction
agardnerITcommented, Oct 25, 2022

My intention isn’t to fail the response but more use it as a hint. Ie. when the request hits the API to the backend and back - that’s the time I’m interested in hinting at.

Other actors can then infer expected behaviour. It would eliminate false callouts as I can see that actually, the dev intended it to take 5 seconds so no point in moaning that it is taking 3.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Email Response Times: How to Measure and Why It Matters
Surveys conducted by Microsoft and Klaus found that 50% of email senders expect a reply within 24 hours, while a more recent one...
Read more >
Tips to improve email response times: expectations, policy ...
The average email response time for sales leads is 42 hours. Sound slow? It is! Especially when you consider that companies that reply...
Read more >
What Is An Appropriate Response Time To Email?
Fifty percent of responses are sent within two hours, and according to one study, the most common email response time is two minutes....
Read more >
5 Ways to Reduce Customer Service Response Times
According to our own research of 1,000 companies, the average response time to respond to customer service requests is 12 hours and 10...
Read more >
How Fast Should You Respond or Expect a Response to ...
What is the standard turnaround time to send a business email response? ... Short Answer: As fast as you can! Long Answer: I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found