data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

Hot Reload the OpenApi Document

Open aaronburtle opened this issue 2 years ago • 1 comments

Why make this change?

Part of the ongoing work for https://github.com/Azure/data-api-builder/issues/67

this closes https://github.com/Azure/data-api-builder/issues/1869

This change will reload the open api docs during a hot reload scenario.

What is this change?

Update the documentor class to get a new runtimeconfig rather than storing one internally. Then add a documentor to the runtimconfig provider, and pass it into the config file watcher. We then can call the create document function when we are hot reloading.

How was this tested?

Testing is still needed. Will keep as draft until tested.

Sample Request(s)

  • Example REST and/or GraphQL request to demonstrate modifications
  • Example of CLI usage to demonstrate modifications

aaronburtle avatar Nov 08 '23 11:11 aaronburtle

This will also hot reload only the runtimeconfig section in the openapi doc? If rest.enabled changes from true to false, will the openapi doc no longer be available?

ayush3797 avatar Nov 10 '23 10:11 ayush3797

closing since this is really old. Please reopen a new PR with conflicts resolved and latest codebase changes included.

seantleonard avatar Aug 28 '24 18:08 seantleonard