Skip to content

Commit

Permalink
Reorder OpenAPI interceptors for correct initialization sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
t-burch committed Jan 20, 2025
1 parent 7a52ad0 commit beb8e0d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ private void initOpenAPI() {
basePaths = getOpenAPIMap();
configureBasePaths();

interceptors.add(new OpenAPIPublisherInterceptor(apiRecords));
interceptors.add(new OpenAPIInterceptor(this, router));
interceptors.addFirst(new OpenAPIInterceptor(this, router));
interceptors.addFirst(new OpenAPIPublisherInterceptor(apiRecords));
}

/**
* One API should not have multiple OpenAPI specs sharing the same path. The interceptor needs the path to check against
* the right OpenAPI. Therefor the path must be unique.
* the right OpenAPI. Therefore the path must be unique.
* The check does not consider variables. Maybe this is needed in the future?
*/
void checkForDuplicatePaths() {
Expand Down

0 comments on commit beb8e0d

Please sign in to comment.