diff --git a/README.md b/README.md index dbf5aca..a7d2889 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,36 @@ r.Use(fiberredoc.New(doc)) ``` See [examples](/_examples) + + +## Configuration Options + + +```go +r := redoc.Redoc{ + SpecFile: "testdata/spec.json", + SpecFS: &spec, + SpecPath: "/openapi.json", // "/openapi.yaml" Title: "Test API", + Description: "Meta Description" + Options: map[string]any{ + "disableSearch": true, + "theme": map[string]any{ + "colors": map[string]any{"primary": map[string]any{"main": "#297b21"}}, + "typography": map[string]any{"headings": map[string]any{"fontWeight": "600"}} + "sidebar": map[string]any{"backgroundColor": "#cae6c6"}, + }, + }, +} +``` + +`Title` : The head title of your html page - Shown on search engine. + +`Description` : The head meta description of your html page - Shown on search engine. + +`Options`: redoc option see [Redoc Configuration Documentation](https://github.com/Redocly/redoc/blob/main/docs/config.md) + +`SpecFile`: file path to your openapi/swagger file from your project. + +`SpecPath`: url path to call your openapi/swagger file from redoc documentation. Must be aligned with your web server configuration. + +`DocsPath` : url path to call your generated API documentation. Must be aligned with your web server configuration. \ No newline at end of file diff --git a/assets/index.html b/assets/index.html index 09a1ef5..53cc3e1 100644 --- a/assets/index.html +++ b/assets/index.html @@ -15,6 +15,6 @@
- +