Skip to content

Commit

Permalink
Added empty api v2 + shared folder and README.md (#9920)
Browse files Browse the repository at this point in the history
refs #9866
  • Loading branch information
kirrg001 authored and rishabhgrg committed Sep 27, 2018
1 parent 6163d1f commit efc5219
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions core/server/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# API Versioning

Ghost supports multiple API versions.
Each version lives in a separate folder e.g. api/v0.1, api/v2.
Next to the API folders there is a shared folder, which the API versions use.

**NOTE: v0.1 is deprecated and we won't touch this folder at all. The v0.1 folder
contains the API layer which we have used since Ghost was born.**

## Stages

Each request goes through the following stages:

- validation
- input serialisation
- permissions
- query
- output serialisation

The framework we are building pipes a request through these stages depending on the API controller implementation.


## API Controller

A controller is no longer just a function, it's a set of configurations.


More is coming soon...
1 change: 1 addition & 0 deletions core/server/api/shared/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
1 change: 1 addition & 0 deletions core/server/api/v2/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};

1 comment on commit efc5219

@letsjustfixit
Copy link
Contributor

Choose a reason for hiding this comment

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

😍 this!

Please sign in to comment.