PokeAPI / ditto

Tool for meta operations over PokéAPI data
Apache License 2.0
49 stars 11 forks source link

Alternative file structure #5

Closed neverendingqs closed 6 years ago

neverendingqs commented 6 years ago

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 6 years ago

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 6 years ago

Hmm okay. Let me create another issue that lists out our options.

tdmalone commented 6 years ago

The succession to this ticket is now at: https://github.com/PokeAPI/pokeapi/issues/356