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 2 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 2 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 2 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 2 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 2 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 3 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 over 2 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 3 years ago
Back to Top Button
Hello readme :)
Is there a way to implement a back to top button to the pages?
Thanks
Posted by Daniela over 2 years ago
Dark mode support
We were thinking to migrate to Readme and because our previous system has dark mode support, we were thinking if this is planned.
Developers staring at night on a bright documentation is something very unpleasant.
Posted by Aditya almost 2 years ago