Code
How square/retrofit is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new HTTP API endpoint
- Create a Java interface with method signature using @GET/@POST/@PUT/@DELETE and parameter annotations like @Path, @Query, @Body.
- Call retrofit.create(YourInterface.class) to generate a proxy implementation from RequestFactory parsing.
- Call the proxy method to get a Call object, then execute().body() synchronously or enqueue(callback) asynchronously.
Add support for a new serialization format (JSON, XML, Protobuf, etc.)
- Create a class implementing Converter.Factory with converterFactory(Type, Annotation[], Retrofit) returning Converter instances.
- Register your factory via retrofit.addConverterFactory(yourFactory) before calling create().
Add support for custom return types (Future, Observable, Single, etc.)
- Create a class implementing CallAdapter.Factory with get(Type, Annotation[], Retrofit) returning a CallAdapter.
- Implement CallAdapter.adapt(Call) to wrap the Call in your target return type (e.g., CompletableFuture.supplyAsync).
- Register your adapter via retrofit.addCallAdapterFactory(yourFactory) before calling create().
Add request/response interceptor or logging
- Create an OkHttp Interceptor and add it to OkHttpClient.Builder via addInterceptor() before passing to Retrofit.
- Intercept request/response via chain.proceed() to log, modify headers, or inject tokens.
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- No public API or start-up file could be picked out from the file names.