Java Libraries Architecture ‐ feign - ronreynolds/openapi-generator GitHub Wiki
(as of 2025-02-26)
- fields
- -log: java.util.logging.Logger (final)
- if
jackson
- #objectMapper: ObjectMapper
- -basePath: String
- -apiAuthorizations: Map< String, RequestInterceptor>
- -feignBuilder: Feign.Builder
- methods
- +ApiClient()
- +ApiClient(authNames: String[])
- +ApiClient(authName: String)
- +ApiClient(authName: String, apiKey: String)
- +getBasePath(): String
- +setBasePath(String): ApiClient
- +getApiAuthorizations(): Map< String, RequestInterceptor>
- +setApiAuthorizations(Map< String, RequestInterceptor>): void
- +getFeignBuilder(): Feign.Builder
- +setFeignBuilder(Feign.Builder): ApiClient
- if
jackson
- -createObjectMapper(): ObjectMapper
- +getObjectMapper(): ObjectMapper
- +setObjectMapper(ObjectMapper): ApiClient
- if
hasOAuthMethods
- -buildOauthRequestInterceptor(OAuthFlow, String, String, String): RequestInterceptor
- +setClientCredentials(String, String): void
- +setOauthPassword(String, String, String, String): void
- +setAccessToken(String, Integer): void
- +configureAuthorizationFlow(String, String, String): void
- +registerAccessTokenListener(AccessTokenListener): void
- +buildClient(Class< T>) : T extends Api
- +selectHeaderAccept(String[]): String
- +selectHeaderContentType(String[]): String
- +setBearerToken(String): void
- +setBearerToken(Supplier< String>): void
- +setApiKey(String): void
- +setCredentials(String, String): void
- +getAuthorization(String): RequestInterceptor
- +addAuthorization(String, RequestInterceptor): void
- -getAuthorization(Class< T>): T extends RequestInterceptor
- fields
- none
- methods
- none?
- fields
- none
- methods
- +ApiResponseDecoder(ObjectMapper)
- +decode(Response, Type): Object
- fields
- none
- methods
- -EncodingUtils()
- +encodeCollection(Collection< ?>, String): Object (VERY similar to ApiClient.parameterToPairs() et al)
- +encode(Object): String (VERY similar to ApiClient.escapeString() et al)
- fields
- -dateFormat: DateFormat = new RFC3339DateFormat (final)
- methods
- +expand(Object): String (VERY similar to native/ApiClient.valueToString())
- fields
- -serialVersionUID: long = 1 (final) (because ancestor class is Serializable)
- -TIMEZONE_Z: TimeZone = TimeZone.getTimeZone("UTC") (final)
- -fmt: StdDateFormat (final)
- methods
- +RFC3339DateFormat()
- +parse(String): Date
- +parse(String, ParsePosition): Date
- +format(Date, StringBuffer, FieldPosition): StringBuffer
- +clone(): Object (because ancestor class is Cloneable)
- fields (all public non-final!)
- +URL: String
- +description: String
- +variables: Map< String, ServerVariable>
- methods
- +ServerConfiguration(String, String, Map< String, ServerVariable>)
- +URL(Map< String,String>): String
- +URL(): String
- fields (all public non-final!)
- +description: String
- +defaultValue: String
- +enumValues: HashSet< String> = null
- methods
- +ServerVariable(String, String, HashSet< String>)
- fields
- none
- methods
- +containsIgnoreCase(String[], String): boolean
- +join(String[], String): String
- +join(Collection< String>, String): String
- fields
- none
- methods
- +operation(operation-input): Response-Type
- +operationWithHttpInfo(operation-input): ApiResponse< Response-Type>
ApiErrorDecoder implements feign.codec.ErrorDecoder (specific to 401/403 errors; ergo in auth package)
- fields
- -defaultErrorDecoder: ErrorDecoder.Default (final)
- methods
- +decode(String, Response): Exception
- fields
- -location: String (final)
- -paramName: String (final)
- -apiKey: String
- methods
- +ApiKeyAuth(String, String)
- +getLocation(): String
- +getParamName(): String
- +getApiKey(): String
- +setApiKey(String): void
- +apply(feign.RequestTemplate): void
- fields
- -accessTokenEndpoint: String (final)
- -authorizationBaseUrl: String (final)
- methods
- #DefaultApi20Impl(String, String)
- +getAccessTokenEndpoint(): String
- +getAuthorizationBaseUrl(): String
- +getBearerSignature(): BearerSignature
- +getClientAuthentication(): ClientAuthentication
- +getAccessTokenExtractor(): TokenExtractor< OAuth2AccessToken>
- fields
- -username: String
- -password: String
- methods
- +getUsername(): String
- +setUsername(String): void
- +getPassword(): String
- +setPassword(String): void
- +setCredentials(String, String): void
- +apply(feign.RequestTemplate): void
- fields
- -scheme: String (final) (e.g., "Bearer"; why does this even support different schemes? "Bearer" is in the class name)
- -tokenSupplier: Supplier< String>
- methods
- -upperCaseBearer(String): String (called every time in apply; should be moved to ctor as in [https://github.com/OpenAPITools/openapi-generator/pull/20743])
- +HttpBearerAuth(String scheme)
- +getBearerToken(): String
- +setBearerToken(String): void
- +setBearerToken(Supplier< String>): void
- +apply(feign.RequestTemplate): void (inefficient use of
Optional
as ternary; same as in common HttpBearerAuth)
- fields
- LEEWAY_SECONDS: int = 10 (final)
- MILLIS_PER_SECOND: int = 1000 (final)
- -accessToken: String (volatile) (why specifically this ref?)
- -expirationTimeSeconds: Long
- -accessTokenListener: OAuth.AccessTokenListener
- #service: OAuth20Service
- #scopes: String
- #authorizationUrl: String
- #tokenUrl: String
- methods
- +OAuth(String, String, String)
- +apply(feign.RequestTemplate): void
- +registerAccessTokenListener(AccessTokenListener): void (synchronized) (no reason to synchronize if accessTokenLister was volatile)
- +getAccessToken(): String (synchronized) (possibly synchronized to avoid check-then-act logic; specifically expirationTimeSeconds == null)
- +setAccessToken(String, Integer): void (synchronized)
- getOAuth2AccessToken(): OAuth2AccessToken (abstract)
- getFlow(): OAuthFlow (abstract)
- -requestContainsNonOauthAuthorization(feign.RequestTemplate): boolean
- -updateAccessToken(): void (synchronized)
- fields
- none
- methods
- +notify(OAuth2AccessToken): void
- fields
- none (modifies OAuth.service)
- methods
- +OauthClientCredentialsGrant(String, String, String)
- +configure(String, String): void
- #getOAuth2AccessToken(): OAuth2AccessToken
- #getFlow(): OAuthFlow = APPLICATION
- fields (all final)
- ACCESS_CODE
- IMPLICIT
- PASSWORD
- APPLICATION
- methods
- none
- fields
- -username: String
- -password: String
- methods
- +OauthPasswordGrant(String, String)
- +configure(String, String, String, String): void
- #getOAuth2AccessToken(): OAuth2AccessToken
- #getFlow(): OAuthFlow = PASSWORD
- fields
- -statusCode: int (final)
- -headers: Map< String, Collection< String>> (final)
- -data: T
- methods
- +ApiResponse(int, Map< String, Collection< String>>, T)
- +getStatus(): int
- +getHeaders(): Map< String, Collection< String>>
- +getData(): T
- fields
- -field-name: Field-Type
- methods
- +Model-Type()
- +field-name(Field-Type): Model-Type (for fluent set chaining)
- if Field-Type is collection
- +addField-name(Field-Type): Model-Type (for fluent set chaining)
- +getField-name(): Field-Type
- +setField-name(Field-Type): void
- +equals(Object): boolean
- +hashCode(): int
- +toString(): String
- -toIndentedString(Object): String (could be a shared static utility method)