You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-playground/customization/adding-sdk-examples.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Adding SDK examples"
3
3
description: "Display language-specific code samples alongside your API endpoints to show developers how to use your SDKs"
4
4
---
5
5
6
-
If your users interact with your API using an SDK rather than directly through a network request, you can use the `x-codeSamples` extension to add code samples to your OpenAPI document and Mintlify will display them in your OpenAPI pages.
6
+
If your users interact with your API using an SDK rather than directly through a network request, you can use the `x-codeSamples` extension to add code samples to your OpenAPI document and display them in your OpenAPI pages.
7
7
8
8
This property can be added to any request method and has the following schema.
9
9
@@ -19,7 +19,7 @@ This property can be added to any request method and has the following schema.
19
19
The source code of the sample.
20
20
</ParamField>
21
21
22
-
Here is an example of some code samples for a plant tracking app, which has both a Bash CLI tool and a JavaScript SDK.
22
+
Here is an example of code samples for a plant tracking app, which has both a Bash CLI tool and a JavaScript SDK.
Copy file name to clipboardExpand all lines: api-playground/customization/complex-data-types.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,25 +3,25 @@ title: "Complex data types"
3
3
description: "Describe APIs with flexible schemas, optional properties, and multiple data formats using `oneOf`, `anyOf`, and `allOf` keywords"
4
4
---
5
5
6
-
When your API accepts multiple data formats, has conditional fields, or uses inheritance patterns, OpenAPI's schema composition keywords help you document these flexible structures clearly. Using `oneOf`, `anyOf`, and `allOf`, you can describe APIs that handle different input types or combine multiple schemas into comprehensive data models.
6
+
When your API accepts multiple data formats, has conditional fields, or uses inheritance patterns, OpenAPI's schema composition keywords help you document these flexible structures. Using `oneOf`, `anyOf`, and `allOf`, you can describe APIs that handle different input types or combine multiple schemas into comprehensive data models.
7
7
8
8
## `oneOf`, `anyOf`, `allOf` keywords
9
9
10
10
For complex data types, OpenAPI provides keywords for combining schemas:
11
11
12
-
-`allOf`: Combines multiple schemas (like merging objects or extending a base schema). Functions like an *and* operator.
13
-
-`anyOf`: Accepts data matching any of the provided schemas. Functions like an *or* operator.
14
-
-`oneOf`: Accepts data matching exactly one of the provided schemas. Functions like an *exclusive-or* operator.
12
+
-`allOf`: Combines multiple schemas (like merging objects or extending a base schema). Functions like an `and` operator.
13
+
-`anyOf`: Accepts data matching any of the provided schemas. Functions like an `or` operator.
14
+
-`oneOf`: Accepts data matching exactly one of the provided schemas. Functions like an `exclusive-or` operator.
15
15
16
-
<Warning>Mintlify treats `oneOf` and `anyOf` identically. Most APIs work fine with `anyOf`since the practical difference is rarely important to users.</Warning>
16
+
<Warning>Mintlify treats `oneOf` and `anyOf` identicallysince the practical difference rarely affects using the API.</Warning>
17
17
18
18
For detailed specifications of these keywords see the [OpenAPI documentation](https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/).
19
19
20
-
<Info>The `not` keyword is not currently supported.</Info>
20
+
<Info>The `not` keyword is currently unsupported.</Info>
21
21
22
22
### Combining schemas with `allOf`
23
23
24
-
When you use `allOf`, Mintlify performs some preprocessing on your OpenAPI document to display complex combinations in a readable way. For example, when you combine two object schemas with `allOf`, Mintlify combines the properties of both into a single object. This becomes especially useful when leveraging OpenAPI's [reusable `components`](https://swagger.io/docs/specification/components/).
24
+
When you use `allOf`, Mintlify performs some preprocessing on your OpenAPI document to display complex combinations in a readable way. For example, when you combine two object schemas with `allOf`, Mintlify combines the properties of both into a single object. This becomes especially useful when leveraging OpenAPI's reusable [`components`](https://swagger.io/docs/specification/components/).
description: "Control which endpoints from your OpenAPI specification appear in your documentation navigation"
4
4
---
5
5
6
+
You can control which OpenAPI operations get published as documentation pages and their visibility in navigation. This is useful for internal-only endpoints, deprecated operations, beta features, or endpoints that should be accessible via direct URL but not discoverable through site navigation.
6
7
7
-
You can control exactly which parts of your OpenAPI specification get published and how they're organized. Hiding pages can be useful when you're documenting internal APIs, beta features, or other endpoints that shouldn't appear in navigation.
8
-
9
-
If your pages are autogenerated from an OpenAPI document, you can control which endpoints get published and how they appear in your documentation with the `x-hidden` and `x-excluded` extensions.
8
+
If your pages are autogenerated from an OpenAPI document, you can manage page visibility with the `x-hidden` and `x-excluded` extensions.
0 commit comments