Files
flipper/desktop/plugins/public/network/docs/_protobuf-retrofit.mdx
Anton Nikolaev ceba421997 Prepend mdx files which used as includes with underscore to avoid creating and indexing pages from them
Summary:
By default docusaurus generates pages and routes for every mdx file it finds under the root dir. So even for the mdx files which are only used as includes and don't even have headers, page is still created, then index and often looks very weird, e.g. title is the same as file name etc. See e.g. this one: https://www.internalfb.com/intern/staticdocs/flipper/docs/fb/portal-troubleshooting/

I went through Flipper docs and renamed all mdx files which are only used as includes to prepend them with underscore. Everything which name is starting with underscore, or which is inside a folder which name is starting with underscore is considered private by docusaurus and skipped.

Reviewed By: passy

Differential Revision: D32722547

fbshipit-source-id: 0524d4dd56960714fbdd2b01ad8383cd16de4948
2021-11-30 13:26:17 -08:00

26 lines
925 B
Plaintext

### Gradle Dependencies
Ensure that you already have an explicit dependency in your application's
`build.gradle` including the plugin dependency, e.g.
```groovy
dependencies {
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-protobuf:2.9.0"
// update version below to match latest Flipper client app
debugImplementation "com.facebook.flipper:flipper-retrofit2-protobuf-plugin:0.84.0"
}
```
### Sending Retrofit Service
Suppose you have a Retrofit service interface `PersonService` which has Protobuf body or return types. At the time you create your implementation, call the plugin with your `baseUrl` and service class:
```
import com.facebook.flipper.plugins.retrofit2protobuf.SendProtobufToFlipperFromRetrofit
...
val personService = retrofit.create(PersonService::class.java)
SendProtobufToFlipperFromRetrofit(baseUrl, PersonService::class.java)
```