According to the OpenAPI specification documentation [1] developers can define Oauth2 tokenUrl, refreshUrl, or authorizationUrl as relative paths for the API base URL in the security schemas if authz endpoints are located in the same server. But, when try define these in the OpenAPI spec and try to generate the client code using that the generated types only contain the relative path.
Consider the following generated code:
public type OAuth2ClientCredentialsGrantConfig record {|
*http:OAuth2ClientCredentialsGrantConfig;
# Token URL
string tokenUrl = "/oauth/token";
...
|};
Description:
According to the OpenAPI specification documentation [1] developers can define Oauth2
tokenUrl
,refreshUrl
, orauthorizationUrl
as relative paths for the API base URL in the security schemas if authz endpoints are located in the same server. But, when try define these in the OpenAPI spec and try to generate the client code using that the generated types only contain the relative path.Consider the following generated code:
[1] - https://swagger.io/docs/specification/authentication/oauth2/ refer
Relative Endpoint URLs
section.