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.

OpenApiClientProvider with Stripe's open API hangs (3MB json)

See original GitHub issue

Description

The autocompletion hangs and stops working when using OpenApiClientProvider with Stripe’s open API. No visible error happens anywhere.

Repro steps

  1. Try to use OpenApiClientProvider with the stripe API
open SwaggerProvider

let [<Literal>] Schema = "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.sdk.json"
// __SOURCE_DIRECTORY__ + "/openapi/stripe.spec3.json"
type Stripe = OpenApiClientProvider<Schema>

let main argv =
    let stripe = Stripe.Client()
    // the autocompletion dies or stops working at this point

That JSON file is about 3MB

Expected behaviour

I would expect to work as with any other open API or to get a visible error somewhere

Actual behavior

The autocompletion dies or stops working and doesn’t seem to recover. To wait a large amount of time does not help.

Known workarounds

None:

  • All F# IDEs behave in the same way.
  • Serving the schema from the localhost doesn’t make any difference.

Related information

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
toburgercommented, Feb 6, 2021

Nice! But I’ve experienced those issues also with other OpenAPI services (not 3MB though) and it would be nice to have a solution for those performance problems.

0reactions
jkone27commented, Jun 12, 2021

I also had issues of slowdown with bigger openapi files, would be great if there could be some perf optimization, or improve caching (or generate some offline schema that could be re-used from file system, once the generation has happened already?) This type provider is awesome 💌

Read more comments on GitHub >

github_iconTop Results From Across the Web

swagger-ui hangs on big responses
One of my endpoints returns a JSON (not huge, around 2MB). Trying to run GET on this endpoint in swagger-ui results in the...
Read more >
OpenAPI Specification - Version 3.0.3
An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML...
Read more >
OpenApiClientProvider with Stripe's open API hangs (3MB json)
The autocompletion hangs and stops working when using OpenApiClientProvider with Stripe's open API. No visible error happens anywhere.
Read more >
Open API
Open API is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services.
Read more >
API documentation with OpenAPI
OpenAPI is a standardized mechanism for developers to describe REST APIs for generating structured documentation in a microservice.
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