mirror of
https://github.com/adidas/api-guidelines.git
synced 2025-10-25 15:19:19 +00:00
add example, use supermodel models as source of truth for hal and problem detail
This commit is contained in:
63
supermodel/adidas/api/HAL.yaml
Normal file
63
supermodel/adidas/api/HAL.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
$id: http://supermodel.io/adidas/api/HAL
|
||||
$schema: http://json-schema.org/draft-07/schema#
|
||||
title: HAL
|
||||
description: JSON Hypertext Application Language. Definition of [HAL message format](https://tools.ietf.org/html/draft-kelly-json-hal-08)
|
||||
type: object
|
||||
properties:
|
||||
_links:
|
||||
type: object
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- $ref: '#/definitions/halLinkObject'
|
||||
- type: array
|
||||
items:
|
||||
- $ref: '#/definitions/halLinkObject'
|
||||
properties:
|
||||
curies:
|
||||
anyOf:
|
||||
- $ref: '#/definitions/halCuriesLink'
|
||||
- type: array
|
||||
items:
|
||||
- $ref: '#/definitions/halCuriesLink'
|
||||
_embedded:
|
||||
type: object
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- $ref: '#'
|
||||
- type: array
|
||||
items:
|
||||
- $ref: '#'
|
||||
definitions:
|
||||
halLinkObject:
|
||||
title: HAL Link Object
|
||||
type: object
|
||||
properties:
|
||||
href:
|
||||
type: string
|
||||
templated:
|
||||
type: boolean
|
||||
type:
|
||||
type: string
|
||||
deprecation:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
profile:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
hreflang:
|
||||
type: string
|
||||
required:
|
||||
- href
|
||||
halCuriesLink:
|
||||
title: HAL Curies Link
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
templated:
|
||||
enum:
|
||||
- true
|
||||
required:
|
||||
- templated
|
||||
- $ref: '#/definitions/halLinkObject'
|
||||
19
supermodel/adidas/api/ProblemDetail.yaml
Normal file
19
supermodel/adidas/api/ProblemDetail.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
$id: http://supermodel.io/adidas/api/ProblemDetail
|
||||
$schema: http://json-schema.org/draft-07/schema#
|
||||
title: Problem Details for HTTP APIs
|
||||
description: Definition of [RFC7807](https://tools.ietf.org/html/rfc7807) problem detail
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
status:
|
||||
type: number
|
||||
detail:
|
||||
type: string
|
||||
instance:
|
||||
type: string
|
||||
required:
|
||||
- title
|
||||
- detail
|
||||
Reference in New Issue
Block a user