Discussions
Is it possible to place two images side by side?
I'm writing some documentation for a mobile application, for this i use a lot of mobile screenshot, which don't really work in the standard layout as they will take up the entire screen. Is there any way to place two images side by side?
Posted by David over 3 years ago
POST requests add base64 on multipart/form-data when file is referenced in the payload
Recently users have been complaining that some of the examples from the documentation are not working.
Previously when a file was attached to the payload (multipart/form-data), it was attached the following way:
curl -X POST "https://api.emysound.com/api/v1/Tracks" -H "accept: application/json" -F "file=@do_not_go.wav;type=audio/x-wav"
Since latest updates, it attaches it the following way:
curl --request POST \
--url https://api.emysound.com/api/v1/Tracks \
--header 'Accept: application/json' \
--header 'Content-Type: multipart/form-data; boundary=---011000010111000001101001' \
--form MediaType=Audio \
--form 'file=data:audio/x-wav;name=do_not_go.wav;base64 <ENTIRE BASE 64 OF THE FILE>
The difference is in the file form:
Previous: --form "file=@do_not_go.wav;type=audio/x-wav"
Right now: --form "file=data:audio/x-wav;name=do_not_go.wav;base64 <ENTIRE BASE 64 OF THE FILE>"
Notice how it attaches base64 on the entire file which triggers errors on the server side since no base64 payload is expected, rather path to the file.
Is there any way to enable back previous behavior?
Posted by Sergiu about 3 years ago
Swagger schema validation failed
trying to import a URL and got this error:
```
Swagger schema validation failed.
Data does not match any schemas from 'anyOf' at #/definitions/ResponseListWebhookAction/properties/data/items
Array items are not unique (indexes 0 and 22) at #/definitions/ResponseListWebhookAction/properties/data/items/enum
Expected type array but found type object at #/definitions/ResponseListWebhookAction/properties/data/items
JSON_OBJECT_VALIDATION_FAILED
```
File URL is https://app.harness.io/gateway/pipeline/api/swagger.json
Posted by Michael Cretzman about 3 years ago
oneOf rendered as pulldown in API Reference
Our OAS has "oneOf" objects specified in component schemas, similar to the example below. Although they render correctly in Swagger Editor, they don't appear to render correctly in API Reference in Staging. Specifically, instead of the objects being rendered, a pulldown with two options "Option1" and "Option2" is rendered. Selecting an option from the pulldown does not result in any action.
My expectation is that both of the objects would be rendered with a notation indicating "oneOf", or a pulldown with the objects' descriptions would be rendered and the objects would be rendered when selected from the pulldown. Is there something wrong with our spec that is preventing the expected behavior?
```
openapi: 3.0.1
info:
title: foo
version: "1.0"
paths:
/pets:
post:
summary: Posts a pet
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
responses:
'200':
description: Updated
components:
schemas:
Pet:
type: object
oneOf:
- type: object
properties:
catInfo:
$ref: '#/components/schemas/Cat'
- type: object
properties:
dogInfo:
$ref: '#/components/schemas/Dog'
Dog:
properties:
bark:
type: boolean
breed:
type: string
enum: [Dingo, Husky, Retriever, Shepherd]
Cat:
properties:
hunts:
type: boolean
age:
type: integer
```
Posted by Taylor Murphy over 3 years ago
How to hide/disable "Try it" button?
Hi,
Is there an option to hide/disable the "Try it" button, on a per-endpoint basis or globally for all API endpoints ?
Thank you!
Eric
Posted by Eric T over 3 years ago
Access sitemap.xml file?
Does Readme.io maintain a sitemap.xml file for individual documentation sites? And if so, what is the URL to access for our site?
Posted by Justin Yonk almost 4 years ago
How to replace example.com from the code snippets, in the language examples?
For example on the api reference page, when looking at the `curl` example
```
Request
curl --request GET \
--url https://example.com/api/v0.0.1/schema/ \
--header 'Accept: application/vnd.oai.openapi'
```
Or, the python version:
```
Installation
Request
import requests
url = "https://example.com/api/v0.0.1/schema/"
headers = {"Accept": "application/vnd.oai.openapi"}
response = requests.request("GET", url, headers=headers)
print(response.text)
```
How to replace `example.com`?
I saw : https://docs.readme.com/docs/url-paths-in-readme#url-element-descriptions
But it didn't really go into any sort of details.
I also tried: https://docs.readme.com/docs/passing-data-to-jwt#setting-default-variables-in-the-ui
Posted by James Munsch about 3 years ago
How do I get example responses to display?
I have examples included in the OpenApi.json but the example does not display in the readme.com. The example do display in both swaggerUI and redoc.
The example is included in the component.schema object and looks like the following...
```
{
"components": {
"schemas": {
"Video": {
"required": [
"title"
],
"type": "object",
"properties": {
"title": {
"maxLength": 255,
"type": "string"
},
"summary": {
"maxLength": 2000,
"type": "string",
"nullable": true
}
},
"example": "video example object"
}
}
}
}
```
Posted by Rachelle almost 4 years ago
Quick way to create bookmarks / anchors?
In a page of the Guides section, if I want to create a navigational link that jumps to a bookmark or anchor in the same page, is there any quick way to do this other than writing one or more HTML blocks?
For example, if I add an HTML block I can use a href="#bookmark" target="_self" and then later on in the page I can have another HTML block with a name="bookmark". This seems to work ok, it but it seems like a lot of extra work and in the rendered page, the styling of the HTML text doesn't match the default styling of other text on the page created using markdown.
I've checked a markdown syntax guide, but I don't see anything about anchors/bookmarks. Thanks in advance for any guidance or suggestions. :)
Posted by John Trumble about 3 years ago
Let customers download open api spec
The admin dashboard has a way to export the api to oas spec file
But it doesn't seem like there's a way for the public facing api spec page to download an oas json file
That would be useful for customers if they prefer exploring the api with tools like Postman etc
Posted by Michael De Razon almost 4 years ago