-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I do apologise, right clicking on the *.refitter file gives the following: Just need to check/verify that both the OpenAPI spec + interface implementation re-generate or not. |
Beta Was this translation helpful? Give feedback.
-
@temelj Thanks for taking the time to bring this up. Custom Tools are executed when changes to the file are written to disk. They're designed for convenience and hide the code generation process a bit from the user. I went for this approach thinking that when there are no changes to the OpenAPI spec, there is no need to re-generate the file. This turned out to be very wrong since the code generators used by this extension are updated upon every release and the generated output might differ every time |
Beta Was this translation helpful? Give feedback.
-
@christianhelle that was a very quick reply 😄 And thank you for the cool and very handy extension. Your approach and assumptions make sense to me as well. So, if the front-end relies on one or more Web APIs that expose their OpenAPI spec, it makes sense in my use case that the updates to the OpenAPI occur at the service end, without requiring a developer to keep the OpenAPI spec in the web app in sync. Based on the current approach, you first load the OpenAPI spec via the specification URL. However, after the initial load, you need to keep the OpenAPI spec in sync manually:
I noticed that the
I changed this to point to the You could then set up the There are a few options, but for now, I am happy to have this tool generate the Refit interface. It takes out manual labour, and I thank you for that! 😄 Regarding your second statement:
I'm not sure if that's an issue, though. It would be perfectly fine (and expected) that upon a new release of the external tooling (Refit/NSwag), the |
Beta Was this translation helpful? Give feedback.
I do apologise, right clicking on the *.refitter file gives the following:
Just need to check/verify that both the OpenAPI spec + interface implementation re-generate or not.