Alternative file structure
neverendingqs opened this issue · 3 comments
neverendingqs commented
To support migrating PokeAPI to static files, the file structure will have to change from
data/
|- api/
| |- v2/
| | |- language/
| | | |- 1/
| | | | |- index.json
...
to
data/
|- api/
| |- v2/
| | |- language/
| | | |- 1
| | | | ...
| | |- language
, where each sub-directory also has a file of the same name, and all index.json
instances are removed.
It can be either a complete change or a flag if we don't want to change how ditto serve
works.
sargunv commented
This suggestion would actually break API requests with a trailing slash. We can just keep the existing structure and configure the http server to treat index.json as the default index file for a directory.
neverendingqs commented
Hmm okay. Let me create another issue that lists out our options.
tdmalone commented
The succession to this ticket is now at: PokeAPI/pokeapi#356