Skip to main content

Configuring API Reference

Configuring API Reference

How to hide operations

To hide operations you can use hideOperations property in portal section of konfig.yaml file. The property is a map where keys are paths to operations and values are maps with HTTP methods as keys and boolean values. If the value is true then the operation will be hidden in the API Reference page.

konfig.yaml

_13
portal:
_13
title: Acme
_13
primaryColor: '#9fc1be'
_13
favicon: favicon.png
_13
logo: portal-logo.png
_13
socials:
_13
website: https://acme.com
_13
hideOperations:
_13
/holdings:
_13
get: true
_13
hideSecurity:
_13
- name: PartnerSignature
_13
- name: PartnerTimestamp

How to hide security requirements

To hide security requirements you can use hideSecurity property in portal. The property is a list of security requirements names that should be hidden in the API Reference page.

konfig.yaml

_13
portal:
_13
title: Acme
_13
primaryColor: '#9fc1be'
_13
favicon: favicon.png
_13
logo: portal-logo.png
_13
socials:
_13
website: https://acme.com
_13
hideOperations:
_13
/holdings:
_13
get: true
_13
hideSecurity:
_13
- name: PartnerSignature
_13
- name: PartnerTimestamp

How to order operations in API Reference

Order operations
List of Operations in Sidebar of API Portal's API Reference Page

To order the list of operations in your API Reference page, you can configure the order property in your konfig.yaml file. Here are the important things to know about the order property:

  • The order property is a list of objects with a "tag" property and an "operations" property.
  • The "tag" property is a string that refers to a tag in your OpenAPI specification.
  • The "operations" property is the order of operations that you want to appear under that tag.
  • An operation can be specified by its "operationId" or by its "path" and "method".
  • The order of tags is defined by the order of the objects in the list
  • The order of operations is defined by the order of the operations in the "operations" property
Unspecified Operations

Operations and tags that are not specified in the order property will appear at the end of the list in the order that they appear in your OpenAPI specification.

konfig.yaml

_15
order:
_15
- tag: user
_15
operations:
_15
- user_create
_15
- user_login
_15
- tag: store
_15
operations:
_15
- store_placeOrder
_15
- tag: pet
_15
operations:
_15
- path: /pet
_15
method: post
_15
portal:
_15
title: Acme
_15
primaryColor: "#1f334e"