Skip to content

Commit

Permalink
Updated RapiDoc to v9.3.4 and updated settings
Browse files Browse the repository at this point in the history
- Schema settings moved to `SchemaConfig`.
- `GeneralConfig` added: `update_route`, `route_prefix` and `persist_auth`.
- `UiConfig` added: `css_file` and `css_classes`.
- `NavConfig` added: `show_method_in_nav_bar`, `nav_accent_text_color`, `nav_active_item_marker`
and `on_nav_tag_click`.
- `NavConfig` removed: `nav_bg_image`, `nav_bg_image_size` and `nav_bg_image_repeat`.
- `HideShowConfig` added: `allow_spec_file_download`, `allow_advanced_search` and `show_curl_before_try`.
- `ApiConfig` changed: `api_key_name`, `api_key_location` and `fetch_credentials`.
- `SlotsConfig` added: `operations_top`.
- Note: The default `RenderStyle` changed from `View` to `Read`.
- Note: `schema_hide_read_only` and `schema_hide_write_only` changed behavior.
  • Loading branch information
ralpha committed Dec 3, 2023
1 parent 16fac1f commit ba09ed6
Show file tree
Hide file tree
Showing 5 changed files with 1,101 additions and 867 deletions.
30 changes: 30 additions & 0 deletions rocket-okapi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ This project follows the [Semantic Versioning standard](https://semver.org/).

## Unreleased (2023-xx-xx)

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

## Unreleased Version 0.8.0 (2023-xx-xx)

### Added
- Added support for new [`Responder`](https://docs.rs/rocket/0.5.0/rocket/response/trait.Responder.html)
types (implemented `OpenApiResponderInner`):
Expand All @@ -14,6 +28,18 @@ This project follows the [Semantic Versioning standard](https://semver.org/).

### Changed
- `rocket-okapi` and `rocket-okapi-codegen` require `rocket v0.5.0`. (#132)
- Updated RapiDoc to `v9.3.4` and updated settings, including changed defaults in RapiDocs.
- Schema settings moved to `SchemaConfig`.
- `GeneralConfig` added: `update_route`, `route_prefix` and `persist_auth`.
- `UiConfig` added: `css_file` and `css_classes`.
- `NavConfig` added: `show_method_in_nav_bar`, `nav_accent_text_color`, `nav_active_item_marker`
and `on_nav_tag_click`.
- `NavConfig` removed: `nav_bg_image`, `nav_bg_image_size` and `nav_bg_image_repeat`.
- `HideShowConfig` added: `allow_spec_file_download`, `allow_advanced_search` and `show_curl_before_try`.
- `ApiConfig` changed: `api_key_name`, `api_key_location` and `fetch_credentials`.
- `SlotsConfig` added: `operations_top`.
- Note: The default `RenderStyle` changed from `View` to `Read`.
- Note: `schema_hide_read_only` and `schema_hide_write_only` changed behavior.

### Deprecated

Expand All @@ -23,6 +49,10 @@ This project follows the [Semantic Versioning standard](https://semver.org/).

### Security


This version also includes all the changes from `0.8.0-rc.1`, `0.8.0-rc.2` and `0.8.0-rc.3`.
See below for more info on the changes made in these versions.

## Version 0.8.0-rc.3 (2023-05-29)

### Added
Expand Down
6 changes: 3 additions & 3 deletions rocket-okapi/rapidoc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
This is a project the visualizes the `openapi.json` file into a webpage the user can navigate and
use for searching though the API documentation.

Repo: https://github.com/mrin9/RapiDoc
Webpage: https://mrin9.github.io/RapiDoc/
Repo: https://github.com/rapi-doc/RapiDoc
Webpage: https://rapidocweb.com/

## How to update
Download the latest release: https://github.com/mrin9/RapiDoc/releases/latest
Download the latest release: https://github.com/rapi-doc/RapiDoc/releases/latest
Copy the following file from the downloaded archive.
All files are located in the folder `/RapiDoc-x.x.x/dist/`:
- rapidoc-min.js
Expand Down
28 changes: 19 additions & 9 deletions rocket-okapi/rapidoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
id="rapidoc"

spec-url="{{SPEC_URL}}"
update-route="{{UPDATE_ROUTE}}"
route-prefix="{{ROUTE_PREFIX}}"
sort-tags="{{SORT_TAGS}}"
sort-endpoints-by="{{SORT_ENDPOINTS_BY}}"
heading-text="{{HEADING_TEXT}}"
goto-path="{{GOTO_PATH}}"
fill-request-fields-with-example="{{REQUEST_EXAMPLE_FIELDS}}"
persist-auth="{{PERSIST_AUTH}}"

theme="{{THEME}}"
bg-color="{{BG_COLOR}}"
Expand All @@ -28,26 +31,23 @@
regular-font="{{REGULAR_FONT}}"
mono-font="{{MONO_FONT}}"
font-size="{{FONT_SIZE}}"
css-file="{{CSS_FILE}}"
css-classes="{{CSS_CLASSES}}"

show-method-in-nav-bar="{{SHOW_METHOD_IN_NAV_BAR}}"
use-path-in-nav-bar="{{USE_PATH_IN_NAV_BAR}}"
nav-bg-color="{{NAV_BG_COLOR}}"
nav-bg-image="{{NAV_BG_IMAGE}}"
nav-bg-image-repeat="{{NAV_BG_IMAGE_REPEAT}}"
nav-text-color="{{NAV_TEXT_COLOR}}"
nav-hover-bg-color="{{NAV_HOVER_BG_COLOR}}"
nav-hover-text-color="{{NAV_HOVER_TEXT_COLOR}}"
nav-accent-color="{{NAV_ACCENT_COLOR}}"
nav-accent-text-color="{{NAV_ACCENT_TEXT_COLOR}}"
nav-active-item-marker="{{NAV_ACCENT_ITEM_MARKER}}"
nav-item-spacing="{{NAV_ITEM_SPACING}}"
on-nav-tag-click="{{ON_NAV_TAG_CLICK}}"

layout="{{LAYOUT}}"
render-style="{{RENDER_STYLE}}"
on-nav-tag-click="{{ON_NAV_TAG_CLICK}}"
schema-style="{{SCHEMA_STYLE}}"
schema-expand-level="{{SCHEMA_EXPAND_LEVEL}}"
schema-description-expanded="{{SCHEMA_DESCRIPTION_EXPANDED}}"
schema-hide-read-only="{{SCHEMA_HIDE_READ_ONLY}}"
schema-hide-write-only="{{SCHEMA_HIDE_WRITE_ONLY}}"
default-schema-tab="{{DEFAULT_SCHEMA_TAB}}"
response-area-height="{{RESPONSE_AREA_HEIGHT}}"

show-info="{{SHOW_INFO}}"
Expand All @@ -57,11 +57,20 @@
allow-authentication="{{ALLOW_AUTHENTICATION}}"
allow-spec-url-load="{{ALLOW_SPEC_URL_LOAD}}"
allow-spec-file-load="{{ALLOW_SPEC_FILE_LOAD}}"
allow-spec-file-download="{{ALLOW_SPEC_FILE_DOWNLOAD}}"
allow-search="{{ALLOW_SEARCH}}"
allow-try="{{ALLOW_TRY}}"
show-curl-before-try="{{SHOW_CURL_BEFORE_TRY}}"
allow-server-selection="{{ALLOW_SERVER_SELECTION}}"
allow-schema-description-expand-toggle="{{ALLOW_SCHEMA_DESC_EXPAND_TOGGLE}}"

schema-style="{{SCHEMA_STYLE}}"
schema-expand-level="{{SCHEMA_EXPAND_LEVEL}}"
schema-description-expanded="{{SCHEMA_DESCRIPTION_EXPANDED}}"
schema-hide-read-only="{{SCHEMA_HIDE_READ_ONLY}}"
schema-hide-write-only="{{SCHEMA_HIDE_WRITE_ONLY}}"
default-schema-tab="{{DEFAULT_SCHEMA_TAB}}"

server-url="{{SERVER_URL}}"
default-api-server="{{DEFAULT_API_SERVER}}"
api-key-name="{{API_KEY_NAME}}"
Expand All @@ -77,6 +86,7 @@
{{OVERVIEW}}
{{SERVERS}}
{{AUTH}}
{{OPERATIONS_TOP}}
{{TAGS}}
{{ENDPOINTS}}
</rapi-doc>
Expand Down
1,595 changes: 857 additions & 738 deletions rocket-okapi/rapidoc/rapidoc-min.js

Large diffs are not rendered by default.

Loading

0 comments on commit ba09ed6

Please sign in to comment.