class CustomSchemaGeneratorOpenAPISchemaGenerator def get_endpointsself request endpoints = superget_endpointsrequest # Remove the endpoint with the path example endpoints
class CustomSchemaGenerator(OpenAPISchemaGenerator): def get_endpoints(self, request): endpoints = super().get_endpoints(request) # Remove the endpoint with the path '/example/' endpoints = [e for e in endpoints if e.path != '/example/'] return endpoints
原文地址: https://www.cveoy.top/t/topic/buQU 著作权归作者所有。请勿转载和采集!