Files
discogs-service/docs/data/documentation/discogsservice/useragentmiddleware/intercept(_:body:baseurl:operationid:next:).json
T
javier d01b60e6dd Added the Rate Limiting headers (#7)
This PR contains the work done to define the `RateLimit`, `RateLimitRemaining` and the `RateLimitUsed` heades into the Open API specification document, as well as including these headers as part of the response for every existing endpoint declared in the mentioned document.

In addition, the `openapi-generator-config` files was also changed to have a different naming strategy.

Reviewed-on: #7
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 13:09:10 +00:00

1 line
8.4 KiB
JSON

{"variants":[{"paths":["\/documentation\/discogsservice\/useragentmiddleware\/intercept(_:body:baseurl:operationid:next:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"request"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"HTTPRequest","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"URL","preciseIdentifier":"s:10Foundation3URLV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"HTTPRequest","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"kind":"text","text":"?, "},{"kind":"typeIdentifier","text":"URL","preciseIdentifier":"s:10Foundation3URLV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","text":"HTTPResponse","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","text":"HTTPResponse","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"HTTPBody","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC"},{"kind":"text","text":"?)"}]}],"kind":"declarations"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/intercept(_:body:baseURL:operationID:next:)"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"intercept(_:body:baseURL:operationID:next:)","roleHeading":"Instance Method","symbolKind":"method","role":"symbol","externalID":"s:14DiscogsService19UserAgentMiddlewareV9intercept_4body7baseURL11operationID4next9HTTPTypes12HTTPResponseV_14OpenAPIRuntime8HTTPBodyCSgtAI11HTTPRequestV_AO10Foundation0I0VSSAK_AOtAQ_AoTtYaYbKXEtYaKF","modules":[{"name":"DiscogsService"}],"extendedModule":"DiscogsService","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)"}]},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware"]]},"references":{"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware/intercept(_:body:baseURL:operationID:next:)":{"title":"intercept(_:body:baseURL:operationID:next:)","abstract":[],"url":"\/documentation\/discogsservice\/useragentmiddleware\/intercept(_:body:baseurl:operationid:next:)","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/intercept(_:body:baseURL:operationID:next:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","url":"\/documentation\/discogsservice","type":"topic","role":"collection","abstract":[],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware":{"role":"symbol","abstract":[{"text":"A middleware that attaches the user agent header into the requests to the service.","type":"text"}],"type":"topic","url":"\/documentation\/discogsservice\/useragentmiddleware","kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"UserAgentMiddleware","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware","navigatorTitle":[{"text":"UserAgentMiddleware","kind":"identifier"}],"title":"UserAgentMiddleware"}}}