api
api copied to clipboard
Weird error when installing an SDK
npx api@beta install @readme-nyc/v1.0#17681m2il63r8rns

@kanadgupta I can't replicate this. 😞
Can you still get this error to pop up?
Ah so it errors out if there's an existing openapi.json
in the directory. Here's the command sequence I ran:
And here's a dump the OpenAPI file in the directory (named openapi.json
):
{
"openapi": "3.0.0",
"info": {
"title": "Endpoints",
"version": "1.0.0"
},
"servers": [
{
"url": "https://readme.nyc/api"
}
],
"paths": {
"/message": {
"get": {
"summary": "Get the current message",
"description": "This will return the current message",
"tags": [
"Messages"
],
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
},
"post": {
"summary": "Update the sign message",
"description": "This will send a message to the Vestaboard to be displayed",
"requestBody": {
"description": "Optional description in *Markdown*",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"text",
"color"
],
"properties": {
"text": {
"type": "string",
"description": "What text should be displayed?"
},
"color": {
"type": "string",
"enum": [
"red",
"orange",
"yellow",
"green",
"blue",
"violet"
]
}
}
}
}
}
},
"tags": [
"Messages"
],
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
},
"delete": {
"summary": "Reset sign message",
"description": "This will reset the Vestaboard's message",
"tags": [
"Messages"
],
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/owlfact": {
"get": {
"summary": "Owl facts",
"description": "Get a random, possibly true, owl fact",
"tags": [
"Fun Facts"
],
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
}
}
},
"tags": [
{
"name": "Messages",
"description": "Interact with the Vestaboard"
}
],
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-API-Key"
}
}
}
}
I've not been able to replicate this, and we've not gotten any other reports about it, so I'm closing it out.