Skip to content

Commit

Permalink
Fix inconsistency in API definition #308
Browse files Browse the repository at this point in the history
  • Loading branch information
tueddy committed Mar 4, 2024
1 parent ca5c216 commit a2c112d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions REST-API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ paths:
properties:
name:
type: string
isDir:
dir:
type: boolean
description: True if item is a directory.
description: True if item is a directory. This parameter is omitted for a file.
post:
summary: Upload a file to a directory.
description: Upload a file to the specified directory.
Expand Down

2 comments on commit a2c112d

@Captain-Sandwich
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data type for dir should be nullable I think. It's not really Boolean

https://swagger.io/docs/specification/data-models/data-types/#null

But that depends on how strict the project adheres to the openapi spec.

@tueddy
Copy link
Collaborator Author

@tueddy tueddy commented on a2c112d Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Captain-Sandwich You are right, datatype should be nullable, I could correct it if I get the chance.

I don't know how strict the specification should be.
It should primarily help to document and understand the ESPuino REST-API in order to simplify new implementations.
Feel free to improve the documentation and you could e.g. create a PR for it!

The best thing to do is to briefly introduce it in the ESPuino forum, e.g. in this thread:
https://forum.espuino.de/t/rfc-migration-zu-neuer-weboberflaeche/2013/79

Please sign in to comment.