Skip to content

Design refresh #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ef7f55d
Implemented basics of new design
wvteijlingen Mar 27, 2015
c288a31
Changed h3s to h2s on FAQ page
wvteijlingen Mar 27, 2015
fd5e53f
Sidebar affix, CSS vendor prefixes
wvteijlingen Mar 29, 2015
74b91cb
Removed fixed width from quicklinks
wvteijlingen Mar 30, 2015
edc1de7
Rename quicklinks and examples
wvteijlingen Mar 30, 2015
836c132
Improved responsiveness
wvteijlingen Mar 30, 2015
5c9087e
Removed old styling for code blocks
wvteijlingen Mar 30, 2015
10d37b1
Added social links to footer
wvteijlingen Mar 30, 2015
cdd70a8
Changed typography to Helvetica Neue
wvteijlingen Mar 30, 2015
5c22119
Improved responsiveness of header
wvteijlingen Mar 30, 2015
d1be980
Fixed respsonsive bug with logo
wvteijlingen Mar 30, 2015
fd1a549
Updated quicklinks margin
wvteijlingen Mar 30, 2015
0d69f80
Removed separate header and footer includes.
wvteijlingen Mar 30, 2015
21f9808
Moved Javascript to all.js
wvteijlingen Mar 30, 2015
78588b0
Removed code collapsing from Javascript.
wvteijlingen Mar 30, 2015
00273f2
Added a check to prevent creation of document outline when no sidebar…
wvteijlingen Mar 30, 2015
617abd7
Removed trailing dot from index page title.
wvteijlingen Mar 30, 2015
dfcb62d
Remove redundant table of contents
dgeb May 19, 2015
b830cbc
Show page title unless showing masthead.
dgeb May 19, 2015
9578f41
Show sidebar for Extensions, Implementations, and Recommendations.
dgeb May 19, 2015
b0ad081
Remove redundant title declaration.
dgeb May 19, 2015
c01a940
Sidebar and H1 styling tweaks.
dgeb May 19, 2015
18db614
Rework masthead and logo.
dgeb May 19, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem "rake", "~> 10.0"
gem "jekyll", "~> 1.0"
gem "redcarpet", "~> 2.2"
gem "rb-fsevent", "~> 0.9"
gem "compass", "~> 0.12"
gem "sass", "~> 3.2"
gem "compass", "~> 1.0"
gem "sass", "~> 3.4"
gem "launchy", "~> 2.3"
gem "redcard", "~> 1.0"
8 changes: 8 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pygments: false
port: 9876

navigation:
- title: JSON API
url: /
- title: Format
url: /format/
- title: Extensions
Expand All @@ -29,3 +31,9 @@ navigation:
url: /faq/
- title: About
url: /about/

quicklinks:
- title: View the specification
url: /format/
- title: Contribute on Github
url: https://github.com/json-api/json-api
33 changes: 0 additions & 33 deletions _includes/footer.html

This file was deleted.

20 changes: 0 additions & 20 deletions _includes/header.html

This file was deleted.

83 changes: 63 additions & 20 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,81 @@
<html>
<head>
<meta charset="utf-8">

<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Use title if it's in the page YAML frontmatter -->
<title>JSON API :: {{ page..title }}</title>
<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,600,700,900' rel='stylesheet' type='text/css'>
<title>JSON:API - {{ page.title }}</title>

<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,300,600' rel='stylesheet' type='text/css'>
<link href="/stylesheets/normalize.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/highlight.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/all.css" media="screen" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/javascripts/all.js" type="text/javascript"></script>
<script src="/javascripts/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>

<body>
{% include header.html %}
<article>
<nav class="site-nav">
<ul>
{% assign url = page.url|remove:'index.html' %}
{% for link in site.navigation %}
<li {% if url == link.url %}class="active"{% endif %}><a href="{{link.url}}" title="{{link.title}}">{{link.title}}</a></li>
{% endfor %}
</ul>
</nav>
{% if page.show_masthead %}
<header>
<div class="content">
<h1>JSON API</h1>
<h2>A standard for building APIs in JSON.</h2>

<section>
{% if page.show_masthead %}
<div class="masthead">
<img src="/images/jsonapi@1.3x.png">
<h1>{{ page.title }}</h1>
<div class="quicklinks">
{% for link in site.quicklinks %}
<a href="{{link.url}}" title="{{link.title}}">{{link.title}}</a>
{% endfor %}
</div>
</div>
</header>
{% endif %}
<div class="site-wrapper">
{% if page.show_sidebar %}
<div class="sidebar">
<nav class="document-outline" id="document-outline">
<h1>{{ page.title }}</h1>
</nav>
</div>
{% else %}
<h1>{{ page.title }}</h1>
{% endif %}
{{ content }}
</section>
</article>
{% include footer.html %}
{% endif %}
<div class="content">
{% unless page.show_masthead %}
<h1>{{ page.title }}</h1>
{% endunless %}
<section>
{{ content }}
</section>
</div>
</div>
<footer>
<span>Built with <a href="http://jekyllrb.com/">Jekyll</a> and <a href="http://softwaremaniacs.org/soft/highlight/en/">Highlight.js</a></span>
<span>Hosted by <a href="http://pages.github.com/">GitHub Pages</a></span>
<span>Generated at {{ site.time | date_to_xmlschema }}</span>
<span class="social-links">
<a class="twitter" href="http://twitter.com/jsonapi"><i class="icon-twitter"></i><span>Twitter</span></a>
<a class="github" href="https://github.com/json-api"><i class="icon-github"></i><span>GitHub</span></a>
<a class="googleplus" href="https://groups.google.com/forum/?fromgroups#!forum/jsonapi"><i class="icon-gplus"></i><span>Google</span></a>
</span>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-40609539-1', 'jsonapi.org');
ga('send', 'pageview');

</script>
</body>
</html>
Binary file added design/jsonapi.sketch
Binary file not shown.
Binary file removed design/jsonapi.sketch/Data
Binary file not shown.
20 changes: 0 additions & 20 deletions design/jsonapi.sketch/metadata

This file was deleted.

1 change: 0 additions & 1 deletion design/jsonapi.sketch/version

This file was deleted.

1 change: 1 addition & 0 deletions extensions/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: page
title: Extensions
show_sidebar: true
---

JSON API can be extended in several ways:
Expand Down
16 changes: 8 additions & 8 deletions faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ layout: page
title: Frequently Asked Questions
---

### Why is JSON API not versioned? <a href="#why-is-json-api-not-versioned" id="why-is-json-api-not-versioned" class="headerlink"></a>
## Why is JSON API not versioned? <a href="#why-is-json-api-not-versioned" id="why-is-json-api-not-versioned" class="headerlink"></a>

Once JSON API is stable, it will always be backwards compatible using a _never
remove, only add_ strategy.
[#46](https://github.com/json-api/json-api/issues/46)

### Why not use the HAL specification? <a href="#why-not-use-the-hal-specification" id="why-not-use-the-hal-specification" class="headerlink"></a>
## Why not use the HAL specification? <a href="#why-not-use-the-hal-specification" id="why-not-use-the-hal-specification" class="headerlink"></a>

There are several reasons:

Expand Down Expand Up @@ -37,7 +37,7 @@ It is extracted from a real-world library already used by a number of projects,
which has informed both the request/response aspects (absent from HAL) and the
interchange format itself.

### How to discover resource possible actions? <a href="#how-to-discover-resource-possible-actions" id="how-to-discover-resource-possible-actions" class="headerlink"></a>
## How to discover resource possible actions? <a href="#how-to-discover-resource-possible-actions" id="how-to-discover-resource-possible-actions" class="headerlink"></a>

You should use the OPTIONS HTTP method to discover what can be done with a
particular resource. The semantics of the methods returned by OPTIONS is defined
Expand All @@ -52,19 +52,19 @@ and capabilities and use the errors response to let users know. This error featu
is still pending to be included in the standard since is still in
[discussion](https://github.com/json-api/json-api/issues/7).

### Where's PUT? Can I use method *X* to do *Y*? <a href="#wheres-put" id="wheres-put" class="headerlink"></a>
## Where's PUT? Can I use method *X* to do *Y*? <a href="#wheres-put" id="wheres-put" class="headerlink"></a>

JSON API does not currently specify the use of the `PUT` method for any purpose.

Servers may complement the base specification by providing extra capabilities and
alternative ways of requesting certain operations (e.g., resource creation via
`PUT` in addition to `POST`).

### Is there a JSON Schema describing JSON API? <a href="#is-there-a-json-schema-describing-json-api" id="is-there-a-json-schema-describing-json-api" class="headerlink"></a>
## Is there a JSON Schema describing JSON API? <a href="#is-there-a-json-schema-describing-json-api" id="is-there-a-json-schema-describing-json-api" class="headerlink"></a>

Not currently, no. JSON Schema cannot fully represent the semantics of JSON API, and so any such schema would be partial anyway.

### Why are resource collections returned as arrays instead of sets keyed by ID?
## Why are resource collections returned as arrays instead of sets keyed by ID?

A JSON array is naturally ordered while sets require metadata to specify order
among members. Therefore, arrays allow for more natural sorting by default or
Expand All @@ -73,14 +73,14 @@ specified criteria.
In addition, JSON API allows read-only resources to be returned without IDs,
which would of course be incompatible with a set keyed by IDs.

### Why are related resources nested in an `included` object in a compound document?
## Why are related resources nested in an `included` object in a compound document?

Primary resources should be isolated because their order and number is often
significant. It's necessary to separate primary and related resources by more
than type because it's possible that a primary resource may have related
resources of the same type (e.g. the "parents" of a "person"). Nesting related
resources in `included` prevents this possible conflict.

### Does JSON API take any position on URI structure, on rules for custom endpoints, which do not fit the paradigm of GET/POST/PATCH/DELETE on the resource URI, etc.?
## Does JSON API take any position on URI structure, on rules for custom endpoints, which do not fit the paradigm of GET/POST/PATCH/DELETE on the resource URI, etc.?

JSON API has no requirements about URI structure, implementations are free to use whatever form they wish.
29 changes: 1 addition & 28 deletions format/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: page
title: "Format"
show_sidebar: true
---

{% include status.md %}
Expand All @@ -18,34 +19,6 @@ JSON API requires use of the JSON API media type
([`application/vnd.api+json`](http://www.iana.org/assignments/media-types/application/vnd.api+json))
for exchanging data.

**Table of Contents**

- [Status](#status)
- [Introduction](#introduction)
- [Conventions](#conventions)
- [Extending](#extending)
- [Document Structure](#document-structure)
- [Top Level](#document-structure-top-level)
- [Resource Objects](#document-structure-resource-objects)
- [Compound Documents](#document-structure-compound-documents)
- [Meta information](#document-structure-meta)
- [Links](#document-structure-links)
- [Member names](#document-structure-member-names)
- [Fetching Data](#fetching)
- [Fetching Resources](#fetching-resources)
- [Fetching Relationships](#fetching-relationships)
- [Inclusion of Related Resources](#fetching-includes)
- [Sparse Fieldsets](#fetching-sparse-fieldsets)
- [Sorting](#fetching-sorting)
- [Pagination](#fetching-pagination)
- [Filtering](#fetching-filtering)
- [Creating, Updating and Deleting Resources](#crud)
- [Creating Resources](#crud-creating)
- [Updating Resources](#crud-updating)
- [Updating Relationships](#crud-updating-relationships)
- [Deleting Resources](#crud-deleting)
- [Errors](#errors)

## Conventions <a href="#conventions" id="conventions" class="headerlink"></a>

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
Expand Down
Binary file added images/jsonapi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/jsonapi@0.7x.png
Binary file not shown.
Binary file removed images/jsonapi@1.3x.png
Binary file not shown.
1 change: 1 addition & 0 deletions implementations/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: page
title: Implementations
show_sidebar: true
---

The following are projects implementing JSON API. If you'd like your project listed, [send a
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
title: "A standard for building APIs in JSON."
title: "A standard for building APIs in JSON"
show_masthead: true
---

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy