ESPuino icon indicating copy to clipboard operation
ESPuino copied to clipboard

Inconsistency in API definition

Open Captain-Sandwich opened this issue 11 months ago • 1 comments

https://github.com/biologist79/ESPuino/blob/1c8195673f2e676de582f1d76fd88139fe8ac88f/REST-API.yaml#L35C1-L37C64

The API definition above it specifies that a GET of /explorer should return an array of objects with isDir = true if a file is a directory. Instead, the field is named dir and only returned for directories. I.e. there is no dir=false for files.

I think it can be fixed here

Captain-Sandwich avatar Mar 04 '24 18:03 Captain-Sandwich

The /explorer JSON can be very large. The omission of dir=false is intended to save memory in payload transmission. You are right, the documentation is wrong here.

tueddy avatar Mar 04 '24 18:03 tueddy

Main issue seems to be fixed, will close it here. Feel free to reopen or improve with a PR..

tueddy avatar Mar 28 '24 21:03 tueddy