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

Provider not updating after schema changes or new schema url #84

Closed
purkhusid opened this issue Aug 21, 2017 · 6 comments
Closed

Provider not updating after schema changes or new schema url #84

purkhusid opened this issue Aug 21, 2017 · 6 comments

Comments

@purkhusid
Copy link

purkhusid commented Aug 21, 2017

Description

Provider does not update when updating schema or when changing schema URL

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a Console application in VS2017
  2. Add SwaggerProvider reference
  3. Add a new type (The PetStore example for example.)
  4. Change the schema URL to another valid Swagger schema
  5. Notice that the provided types do not change

GIF that shows the problem:
typeproviders2

Expected behavior

The provided types should update

Actual behavior

The provided types do not update

Known workarounds

Create new type every time you change the URL or schema

Related information

  • OS: Windows10
  • SwaggerProvider version: 0.8
  • Visual Studio 2017 Update 3.1
@sergey-tihon
Copy link
Member

Hmm... interesting... Do you experience the same behavior when do not use [<Literal>] variable and do paste schema URL directly into type definition SwaggerProvider<"url_here">?

On TP side we do caching using schemaUrl... and it should work correctly if IDE does can to TP after each schemaUrl change...

@purkhusid
Copy link
Author

@sergey-tihon Yeah, I get the same behavior when I put the URL directly into the type definition. Are you not able to reproduce this?

@sergey-tihon
Copy link
Member

Please do try v0.8.1

@purkhusid
Copy link
Author

@sergey-tihon This works perfectly now. Thank you very much. Even updates when I change the remote schema. How is it getting the updates? Is it polling the URL?

@sergey-tihon
Copy link
Member

sergey-tihon commented Aug 22, 2017

No, I just kill the previous implementation of caching, so now, every time when IDE call TP we do call and generate types - https://github.com/fsprojects/SwaggerProvider/pull/85/files

@purkhusid
Copy link
Author

Alrighty, this makes the user experience a whole lot better. I'll close this issue. Thanks for the quick response!

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

No branches or pull requests

2 participants