You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Open Api Document is generated on startup, and so to properly update the doc when a hot reload occurs we need to trigger that create document call as part of the hot reload process. This issues covers implementation of that plus the other changes needed to make sure that the open api docs properly update during a hot reload.
The text was updated successfully, but these errors were encountered:
Current OpenApiDocumentor implementation has function CreateDocument() which has this preliminary check
if(_openApiDocument is not null){thrownew DataApiBuilderException(
message: DOCUMENT_ALREADY_GENERATED_ERROR,
statusCode: HttpStatusCode.Conflict,
subStatusCode: DataApiBuilderException.SubStatusCodes.OpenApiDocumentAlreadyExists);}
Enabling hot reload involes removing this check and rethinking what situations necessitate calling OpenApiDocumentor::CreateDocument() again.
At first glance, adding a hot reload function directly to IOpenApiDocumentor or OpenApiDocumentor is not appropriate. Another service should call openapidocumentor.CreateDocument() when new config comes in.
Consider:
Should we lock or wait for new createdocument operation to complete before allowing new GET https://dab/api/openapi requests to be fulfilled?
Do we need a feature switch for anything hot reload related here? (probably not, but please consider as part of design).
The Open Api Document is generated on startup, and so to properly update the doc when a hot reload occurs we need to trigger that create document call as part of the hot reload process. This issues covers implementation of that plus the other changes needed to make sure that the open api docs properly update during a hot reload.
The text was updated successfully, but these errors were encountered: