swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
17.03k stars 6.03k forks source link

[swagger] Reproduce editor functionality #7111

Closed greg0ire closed 6 years ago

greg0ire commented 6 years ago
Description

I'm trying to reproduce exactly the behavior of http://editor.swagger.io/ with docker. I tried this:

---
version: '2'
services:
  swagger-codegen:
    image: swaggerapi/swagger-codegen-cli
    command: generate -i /docs/swagger.yml -l swagger -o /docs
    volumes:
      - $PWD/docs:/docs
Swagger-codegen version

2.3.0-SNAPSHOT because the image I'm using does not seem to have any tags.

Swagger declaration file content or url
```yaml swagger: "2.0" info: title: SVOD Platform description: "" contact: name: Digital Backstage API Team license: name: MIT version: "1.0" basePath: / schemes: - https - http # remove when in prod consumes: - application/json produces: - application/hal+json - application/problem+json security: - jwt: [] securityDefinitions: jwt: type: apiKey name: Authorization in: header definitions: # # HAL # halResource: title: HAL Resource Object type: object properties: _links: type: object additionalProperties: true _embedded: type: object additionalProperties: true halAccount: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/account' example: _links: self: href: /account name: John Smith preferredUsername: john.smith@example.com givenName: John familyName: Smith, email: john.smith@example.com parentalCode: "0000" birthDate: "2000-01-01" halAvatarList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /avatars next: href: /avatars?page=2 first: href: /avatars?page=1 last: href: /avatars?page=2 _embedded: profiles: - $ref: '#/definitions/halAvatar/example' halAvatar: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/avatar' example: _links: self: href: /avatars/8f6645c1f2e85dd95b5939554967f02a hash: 8f6645c1f2e85dd95b5939554967f02a halProfileList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /profiles next: href: /profiles?page=2 first: href: /profiles?page=1 last: href: /profiles?page=2 _embedded: profiles: - $ref: '#/definitions/halProfile/example' halProfile: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/profile' example: _links: self: href: /profiles/john-smith username: john-smith displayName: John Smith color: #003366 avatar: John-Smith.png type: adult halWorkList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /works next: href: /works?page=2 first: href: /works?page=1 last: href: //works?page=2 _embedded: works: - $ref: '#/definitions/halWorkMini/example' halWork: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/work' example: _links: self: href: /works/md:cid:org:MYSTUDIO:29384567 jobs: href: /works/md:cid:org:MYSTUDIO:29384567/jobs assets: href: /works/md:cid:org:MYSTUDIO:29384567/assets contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" releaseYear: 1982 cover: "poster.png" directors: - Denis Villeneuve runLength: "P00Y00M00DT06H08M00S" originalTitle: "Blade Runner" countryOfOrigin: "FR" synopsis: "Lorem ipnum" halWorkMini: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/workMini' example: _links: self: href: /works/md:cid:org:MYSTUDIO:29384567 jobs: href: /works/md:cid:org:MYSTUDIO:29384567/jobs assets: href: /works/md:cid:org:MYSTUDIO:29384567/assets contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" releaseYear: 1982 cover: "poster.png" directors: - Ridley Scott halWorkWatching: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/workWatching' example: _links: self: href: /works/md:cid:org:MYSTUDIO:29384567 jobs: href: /works/md:cid:org:MYSTUDIO:29384567/jobs assets: href: /works/md:cid:org:MYSTUDIO:29384567/assets contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" releaseYear: 1982 cover: "poster.png" directors: - Ridley Scott uuid: date: "13 Juillet 2015" event: "stop" watchDuration: 25 watchPercent: 67,5 halWorkTvod: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/workTvod' example: _links: self: href: /works/md:cid:org:MYSTUDIO:29384567 jobs: href: /works/md:cid:org:MYSTUDIO:29384567/jobs assets: href: /works/md:cid:org:MYSTUDIO:29384567/assets title: "Blade Runner" cover: "poster.png" directors: - Ridley Scott price: 399 url: "https://www.themoviedb.org/movie/78-blade-runner" halWishList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /wishes next: href: /wishes?page=2 first: href: /wishes?page=1 last: href: /wishes?page=2 _embedded: wishes: - $ref: '#/definitions/halWish/example' halWish: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/profile' example: _links: self: href: /wishes/john-smith contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" halMoodList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /moods next: href: /moods?page=2 first: href: /moods?page=1 last: href: /moods?page=2 _embedded: items: - $ref: '#/definitions/halMood/example' halMood: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/mood' example: _links: self: href: /moods/mood-1 items: /moods/mood-1/items slug: mood-1 title: Cercle littéraire baseline: Les meilleures adaptation de vos livres préférés description: thumb: thumb-mood-1.png picto: picto-mood-1.png background: background-mood-1.png halThematicList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /thematics next: href: /thematics?page=2 first: href: /thematics?page=1 last: href: /thematics?page=2 _embedded: items: - $ref: '#/definitions/halThematic/example' halThematic: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/thematic' example: _links: self: href: /thematics/thematic-1 items: /thematics/thematic-1/items slug: thematic-1 title: Le couple en question baseline: description: thumb: background: halAutomaticList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /automatics next: href: /automatics?page=2 first: href: /automatics?page=1 last: href: /automatics?page=2 _embedded: items: - $ref: '#/definitions/halAutomatic/example' halHighlightList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /highlights next: href: /highlights?page=2 first: href: /highlights?page=1 last: href: /highlights?page=2 _embedded: items: - $ref: '#/definitions/halAutomatic/example' halAutomatic: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/automatic' example: _links: self: href: /automatics/automatic-1 items: /automatics/automatic-1/items slug: automatic-1 title: "Derniers film ajouté" baseline: description: thumb: background: halHighlight: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/highlight' example: _links: self: href: /highlights/highlight-1 items: /highlights/highlight-1/items slug: highlight-1 title: baseline: description: thumb: background: halCycleList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /cycles next: href: /cycles?page=2 first: href: /cycles?page=1 last: href: /cycles?page=2 _embedded: items: - $ref: '#/definitions/halCycle/example' halCycle: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/cycle' example: _links: self: href: /cycles/ana-mougladisse items: /cycles/ana-mougladisse/items slug: ana-mougladisse title: Ana Mougladisse baseline: description: Lorem Ipsum dolor set amet... thumb: thumb-ana-mougladisse.png background: halTvod: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/tvod' example: _links: self: href: /tvod items: /tvod/items title: baseline: Profitez des derniers films sortis en salle sur notre site description: thumb: thumb-tvod.png background: halWatching: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/watching' example: _links: self: href: /watching items: /watching/items title: "Reprendre la lecture" baseline: description: thumb: background: halCornerList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /corners next: href: /corners?page=2 first: href: /corners?page=1 last: href: /corners?page=2 _embedded: items: - $ref: '#/definitions/halCorner/example-1' - $ref: '#/definitions/halCorner/example-2' - $ref: '#/definitions/halCorner/example-3' halCorner: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/corner' example: _links: self: href: /corners/corner-1 items: /corners/corner-1/items slug: corner-1 title: Collection DOCS baseline: Ipsum dolor set amet description: Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet thumb: thumb-corner-1.png background: background-corner-1.png example-1: _links: self: href: /corners/corner-1 items: /corners/corner-1/items slug: corner-1 title: Collection DOCS baseline: Ipsum dolor set amet description: Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet thumb: thumb-corner-1.png background: background-corner-1.png example-2: _links: self: href: /corners/corner-2 items: /corners/corner-2/items slug: corner-2 title: Collection Kids Only baseline: Ipsum dolor set amet description: Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet thumb: thumb-corner-2.png background: background-corner-2.png example-3: _links: self: href: /corners/corner-3 items: /corners/corner-3/items slug: corner-3 title: Collection We Are Belgium baseline: Ipsum dolor set amet description: Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet thumb: thumb-corner-3.png background: background-corner-3.png halLayerList: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /layers next: href: /layers?page=2 first: href: /layers?page=1 last: href: /layers?page=2 _embedded: items: - $ref: '#/definitions/halLayer/example-highlight' - $ref: '#/definitions/halLayer/example-watching' - $ref: '#/definitions/halLayer/example-automatic' - $ref: '#/definitions/halLayer/example-corner' - $ref: '#/definitions/halLayer/example-thematic' - $ref: '#/definitions/halLayer/example-cycle' - $ref: '#/definitions/halLayer/example-mood' - $ref: '#/definitions/halLayer/example-tvod' halLayer: type: object allOf: - $ref: '#/definitions/halResource' - $ref: '#/definitions/layer' example: layerId: "layer-1" type: "highlight" title: "" picto: "" baseline: "" backgroundColor: "" _links: self: href: "http://172.19.0.4/layers/layer-1" items: href: "http://172.19.0.4/layers/layer-1/items" example-highlight: layerId: "layer-1" type: "highlight" title: "" picto: "" baseline: "" backgroundColor: "" _links: self: href: "http://172.19.0.4/layers/layer-1" items: href: "http://172.19.0.4/layers/layer-1/items" example-watching: layerId: "layer-2" type: "watching" title: "Reprendre la lecture" picto: "" baseline: "" backgroundColor: "" _links: self: href: "http://172.19.0.4/layers/layer-2" items: href: "http://172.19.0.4/layers/layer-2/items" example-automatic: layerId: "layer-3" type: "automatic" title: "Derniers films ajoutés" picto: "" baseline: "" backgroundColor: "" _links: self: href: "http://172.19.0.4/layers/layer-3" items: href: "http://172.19.0.4/layers/layer-3/items" example-corner: layerId: "layer-4" type: "corner" title: "Nos Grandes Collections" picto: "picto-layer-4.png" baseline: "Découvrez nos grandes collections" backgroundColor: "#3C3E47" _links: self: href: "http://172.19.0.4/layers/layer-4" items: href: "http://172.19.0.4/layers/layer-4/items" example-thematic: layerId: "layer-5" type: "thematic" title: "Le couple en question" picto: "" baseline: "" backgroundColor: "" _links: self: href: "http://172.19.0.4/layers/layer-5" items: href: "http://172.19.0.4/layers/layer-5/items" example-cycle: layerId: "layer-6" type: "cycle" title: "Cycles Thématiques" picto: "" baseline: "Des thèmes et des personnalités mis à l'honneur chaque semaine" backgroundColor: "#000000" _links: self: href: "http://172.19.0.4/layers/layer-6" items: href: "http://172.19.0.4/layers/layer-6/items" example-mood: layerId: "layer-7" type: "mood" title: "Mood Collections" picto: "" baseline: "Découvrez les films autrement" backgroundColor: "#000000" _links: self: href: "http://172.19.0.4/layers/layer-7" items: href: "http://172.19.0.4/layers/layer-7/items" example-tvod: layerId: "layer-8" type: "tvod" title: "" picto: "" baseline: "Profitez des derniers films sortis en salle sur notre site" backgroundColor: "#000000" _links: self: href: "http://172.19.0.4/layers/layer-7" items: href: "http://172.19.0.4/layers/layer-7/items" halThematicItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /thematics/thematic-1/items next: href: /thematics/thematic-1/items?page=2 first: href: /thematics/thematic-1/items?page=1 last: href: /thematics/thematic-1/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' halCycleItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /cycles/cycle-1/items next: href: /cycles/cycle-1/items?page=2 first: href: /cycles/cycle-1/items?page=1 last: href: /cycles/cycle-1/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' halCornerItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /corners/corner-1/items next: href: /corners/corner-1/items?page=2 first: href: /corners/corner-1/items?page=1 last: href: /corners/corner-1/items?page=2 _embedded: items: - $ref: '#/definitions/halLayer/example-thematic' - $ref: '#/definitions/halLayer/example-thematic' - $ref: '#/definitions/halLayer/example-thematic' - $ref: '#/definitions/halLayer/example-thematic' halMoodItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /moods/mood-1/items next: href: /moods/mood-1/items?page=2 first: href: /moods/mood-1/items?page=1 last: href: /moods/mood-1/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' halLayerItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /layers/layer-1/items next: href: /layers/layer-1/items?page=2 first: href: /layers/layer-1/items?page=1 last: href: /layers/layer-1/items?page=2 _embedded: items: - halTvodItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /tvod/items next: href: /tvod/items?page=2 first: href: /tvod/items?page=1 last: href: /tvod/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkTvod/example' halWatchingItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /watching/items next: href: /watching/items?page=2 first: href: /watching/items?page=1 last: href: /watching/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkWatching/example' halAutomaticItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /automatics/automatics-1/items next: href: /automatics/automatics-1/items?page=2 first: href: /automatics/automatics-1/items?page=1 last: href: /automatics/automatics-1/items?page=2 _embedded: items: - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' - $ref: '#/definitions/halWorkMini/example' halHighlightItems: type: object allOf: - $ref: '#/definitions/halResource' example: _total_items: 20 _page: 1 _page_count: 2 _links: self: href: /highlights/highlights-1/items next: href: /highlights/highlights-1/items?page=2 first: href: /highlights/highlights-1/items?page=1 last: href: /highlights/highlights-1/items?page=2 _embedded: items: - $ref: '#/definitions/halWork/example' - $ref: '#/definitions/halWork/example' - $ref: '#/definitions/halWork/example' # # Errors # problemDetail: description: | HTTP Problem Detail (RFC 7807) required: - type - status - detail properties: type: type: string default: 'about:blank' title: type: string description: | Human-readable summary of the problem type. status: type: integer description: | The HTTP status code for this occurrence of the problem. detail: type: string description: > Human-readable explanation specific to this occurrence of the problem. Undeletable: type: object allOf: - $ref: '#/definitions/problemDetail' example: title: 'Undeletable' detail: 'The resource is undeletable due to being used by others resources' status: 424 AlreadyExists: type: object allOf: - $ref: '#/definitions/problemDetail' example: title: 'Conflict' detail: 'Resource already exists' status: 409 NotFound: type: object allOf: - $ref: '#/definitions/problemDetail' example: title: 'Not Found' detail: 'Cannot find the requested resource' status: 404 ValidationFailed: type: object allOf: - $ref: '#/definitions/problemDetail' properties: errors: type: array items: $ref: '#/definitions/validationMessageError' example: title: 'Validation failed' detail: 'Validation failed' status: 422 errors: - $ref: '#/definitions/validationMessageError/example' validationMessageError: type: object example: fieldName: isEmpty: 'is required' # Avatar avatar: type: object properties: hash: description: md5 hash type: string required: - hash # Account account: type: object properties: name: description: Full name type: string preferredUsername: description: username or email type: string givenName: description: Given name type: string familyName: description: Family name type: string email: type: string parentalCode: type: string birthDate: description: The birth date (YYYY-MM-DD) type: string format: date required: - name - preferredUsername - email # Partial Account patch accountPatch: type: object properties: parentalCode: type: string birthDate: description: The birth date (YYYY-MM-DD) type: string format: date example: birthDate: "2000-01-01" parentalCode: "0000" # Partial Profile profilePatch: type: object allOf: - $ref: '#/definitions/profile' example: color: #CC3366 # Profile profile: type: object properties: displayName: description: Name to display type: string color: description: Hexa code of color type: string avatar: type: string type: type: string enum: - adult - kid required: - displayName - type example: displayName: John Smith color: #003366 avatar: John-Smith.png type: adult work: allOf: - $ref: '#/definitions/workNew' properties: identifier: description: ID internally generated to uniquely identify an avail. type: string required: - identifier workNew: required: - contentId - workType - originalTitle - countyOfOrigin - releaseDate - runLength - language - title properties: contentId: description: The content id as defined in EMA specs type: string language: description: The language as defined by RFC 5646 / BCP 47 (ie. 'fr-FR') type: string allOf: - $ref: '#/definitions/workPatch' workPatch: type: object properties: workType: description: The type of work type: string enum: - Movie - Short - Series - Season - Episode - Non-episodic Show - Promotional - Ad originalTitle: description: The original title type: string countyOfOrigin: description: Country of origin. (ISO 3166-1 alpha-2 country code for the country) type: string releaseDate: description: The release date (YYYY-MM-DD) type: string format: date runLength: description: 'The duration (In a time interval represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S)' type: string title: description: The translated title in given language type: string cover: description: The translated title in given language type: string directors: description: The translated title in given language type: array items: type: string synopsis: description: The translated title in given language type: string workMini: type: object properties: contentId: description: The content id as defined in EMA specs type: string workType: description: The work as defined in EMA specs type: string title: type: string releaseDate: description: The release date (YYYY-MM-DD) type: string format: date cover: type: string directors: type: array items: type: string required: - contentId example: contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" releaseYear: 2017 cover: "poster.png" directors: - Denis Villeneuve # Wish wish: type: object properties: contentId: description: The content id as defined in EMA specs type: string workType: description: The work as defined in EMA specs type: string title: type: string required: - contentId example: contentId: "md:cid:org:MYSTUDIO:29384567" workType: "Movie" title: "Blade Runner" # Thematic thematic: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string required: - slug - title # Mood mood: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string picto: type: string background: description: Thumb type: string required: - slug - title # Cycle cycle: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string required: - slug - title # Corner corner: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string required: - slug - title # TVOD tvod: type: object properties: title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string workTvod: type: object properties: title: type: string cover: type: string directors: type: array items: type: string price: type: integer url: type: string required: - title - url example: title: "Blade Runner" cover: "poster.png" directors: - Ridley Scott price: 399 url: "https://www.themoviedb.org/movie/78-blade-runner" # Watching watching: type: object properties: title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string workWatching: type: object properties: contentId: description: The content id as defined in EMA specs type: string workType: description: The work as defined in EMA specs type: string title: type: string releaseDate: description: The release date (YYYY-MM-DD) type: string format: date cover: type: string directors: type: array items: type: string uuid: type: string date: type: string event: type: string watchDuration: type: integer watchPercent: type: number required: - contentId # Automatic automatic: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string required: - slug - title # Highlight highlight: type: object properties: slug: description: Slug of title type: string title: description: Title type: string baseline: description: Baseline type: string description: description: Description type: string thumb: description: Thumb type: string background: description: Thumb type: string required: - slug # Layer layer: type: object properties: layerId: description: Layer identifier type: string type: description: Title type: string enum: - highlight - corner - cycle - mood - thematic - watching - tvod - automatic title: description: Title of the layer type: string baseline: description: Baseline of the layer type: string picto: description: Picto type: string backgoundColoe: description: RGB Code type: string required: - layerId - type paths: /account: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string tags: - Account summary: "Account infos" description: "Returns account infos" responses: 200: description: An account schema: $ref: '#/definitions/halAccount' patch: tags: - Account summary: Update or create a profile description: Update or create a profile parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: profile in: body schema: $ref: '#/definitions/accountPatch' responses: 204: description: Successfully updated 404: description: The requested profile wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' /avatars: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string tags: - Profile summary: "List avatars" description: "Returns list of avatars" responses: 200: description: An avatar schema: $ref: '#/definitions/halAvatar' /avatars/{hash}: get: tags: - Profile summary: "Return image" description: "Returns a single profile" parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: hash in: path required: true type: string produces: - image/* responses: 200: description: Success 404: description: The requested avatar wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /profiles: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string tags: - Profile summary: List profiles description: Retrieve a list of profiles. responses: 200: description: Success response schema: $ref: '#/definitions/halProfileList' /profiles/{username}: get: tags: - Profile summary: "Find profile by its slug" description: "Returns a single profile" parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: username in: path required: true type: string responses: 200: description: A Profile schema: $ref: '#/definitions/halProfile' 404: description: The requested profile wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' delete: summary: Delete a profile tags: - Profile description: | Delete a previously registered profile. parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: username in: path required: true type: string responses: 204: description: Operation success 404: description: The requested profile wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 424: description: Profile wasn't deletable headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/Undeletable' put: tags: - Profile summary: Update or create a profile description: Update or create a profile parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: username in: path required: true type: string - name: profile in: body required: true schema: $ref: '#/definitions/profilePatch' responses: 204: description: Successfully updated 404: description: The requested profile wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' patch: tags: - Profile summary: Partial update a profile description: Partial update a profile parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: username in: path required: true type: string - name: profile in: body required: true schema: $ref: '#/definitions/profilePatch' responses: 204: description: Successfully patched 404: description: The requested profile wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' /wishes: get: tags: - Profile summary: "Wishlist of a profile" description: Return the wishlist of the given profile parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: X-Account-Profile in: header required: true type: string responses: 200: description: Success response schema: type: array items: $ref: '#/definitions/halWishList' /wishes/{contentId}: put: tags: - Profile summary: To add a work to the profile's wishlist description: Add work to wishlist parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: X-Account-Profile in: header required: true type: string - name: contentId in: path required: true type: string description: The content Id as defined in EMA md. responses: 201: description: Successfully created 404: description: The requested wish wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' delete: tags: - Profile summary: Delete work from wishlist description: Delete work from wishlist parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string - name: X-Account-Profile in: header required: true type: string - name: contentId in: path required: true type: string description: The content Id as defined in EMA md. responses: 204: description: Successfully deleted 404: description: The requested wish wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' /works: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Work description: List of works responses: 200: description: Success response schema: $ref: '#/definitions/halWorkList' post: tags: - Work summary: To create a work description: Create a new work parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: work in: body description: The content idendtifier. required: true schema: $ref: '#/definitions/work' responses: 201: description: Successfully created 409: description: The work already exists headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/AlreadyExists' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' /works/{contentId}: get: tags: - Work description: Get work given its contentId and language parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: contentId in: path description: Content identifier required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halWork' 404: description: The requested work wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' delete: tags: - Work description: Delete work given its contentId and language consumes: - application/json produces: - application/json parameters: - name: contentId in: path description: Content identifier required: true type: string responses: 204: description: Operation success 404: description: The requested work wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 417: description: Expectation failed patch: tags: - Work description: Delete work given its contentId and language consumes: - application/json produces: - application/json parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: contentId in: path description: Content identifier required: true type: string - name: work in: body description: Update or transalate a work required: true schema: $ref: '#/definitions/workPatch' responses: 204: description: Operation success 404: description: The requested work wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' 422: description: Validation Failed headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/ValidationFailed' /thematics: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List thematics" description: "Returns list of thematics" responses: 200: description: A thematic schema: $ref: '#/definitions/halThematicList' /thematics/{slug}: get: tags: - Edito description: Get thematic given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Thematic slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halThematic' 404: description: The requested thematic wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /thematics/{slug}/items: get: tags: - Edito description: Get items of thematic given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Thematic slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halThematicItems' 404: description: The requested thematic wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /moods: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List moods" description: "Returns list of moods" responses: 200: description: A mood schema: $ref: '#/definitions/halMoodList' /moods/{slug}: get: tags: - Edito description: Get mood given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Mood slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halMood' 404: description: The requested mood wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /moods/{slug}/items: get: tags: - Edito description: Get items of mood given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Mood slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halMoodItems' 404: description: The requested mood wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /cycles: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List cycles" description: "Returns list of cycles" responses: 200: description: Success Response schema: $ref: '#/definitions/halCycleList' /cycles/{slug}: get: tags: - Edito description: Get cycle given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Cycle slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halCycle' 404: description: The requested cycle wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /cycles/{slug}/items: get: tags: - Edito description: Get items of cycle given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Cycle slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halCycleItems' 404: description: The requested cycle wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /corners: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List corners" description: "Returns list of corners" responses: 200: description: A corner schema: $ref: '#/definitions/halCornerList' /corners/{slug}: get: tags: - Edito description: Get corner given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Corner slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halCorner' 404: description: The requested corner wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /corners/{slug}/items: get: tags: - Edito description: Get items of corner given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Corner slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halCornerItems' 404: description: The requested corner wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /home: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "Homepage" description: "Returns list of Home layers " responses: 200: description: Layers list schema: $ref: '#/definitions/halLayerList' /layers: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List layers" description: "Returns list of layers" responses: 200: description: Layers list schema: $ref: '#/definitions/halLayerList' /layers/{layerId}: get: tags: - Edito description: Get layer given its identifier parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: layerId in: path description: Layer identifier required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halLayer' 404: description: The requested layer wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /layers/{layerId}/items: get: tags: - Edito description: Get items of layer given its Id parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR, fr-BE, nl-BE)" in: header name: Accept-Language type: string required: true - name: layerId in: path description: layer identification required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halLayerItems' 404: description: The requested corner wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /tvod: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List tvods" description: "Returns tvod layer" responses: 200: description: Success response schema: $ref: '#/definitions/halTvod' /tvod/items: get: tags: - Edito description: Get items of TVOD given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true responses: 200: description: Success response schema: $ref: '#/definitions/halTvodItems' 404: description: The requested TVOD wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /watching: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List current unfinished movies" description: "Returns watching layer" responses: 200: description: Success response schema: $ref: '#/definitions/halWatching' /watching/items: get: tags: - Edito description: Get items of watching parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true responses: 200: description: Success response schema: $ref: '#/definitions/halWatchingItems' 404: description: The requested watching items wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /automatics: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List automatic" description: "Returns list of automatics theme, example : a slider of movies from query in Elastic Search, Last added movies" responses: 200: description: Success Response schema: $ref: '#/definitions/halAutomaticList' /automatics/{slug}: get: tags: - Edito description: Get automatic given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Automatic slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halAutomatic' 404: description: The requested automatic wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /automatics/{slug}/items: get: tags: - Edito description: Get items of automatic given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Automatic slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halAutomaticItems' 404: description: The requested automatic wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /highlights: get: parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true tags: - Edito summary: "List highlight" description: "Returns list of highlights" responses: 200: description: Success Response schema: $ref: '#/definitions/halHighlightList' /highlights/{slug}: get: tags: - Edito description: Get highlight given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Highlight slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halHighlight' 404: description: The requested highlight wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' /highlights/{slug}/items: get: tags: - Edito description: Get items of highlight given its slug parameters: - description: "The desired language for the Metadata specified in IANA (ie: fr-FR)" in: header name: Accept-Language type: string required: true - name: slug in: path description: Highlight slug required: true type: string responses: 200: description: Success response schema: $ref: '#/definitions/halHighlightItems' 404: description: The requested highlight wasn't found headers: Content-Type: type: string default: application/problem+json schema: $ref: '#/definitions/NotFound' ```

Expected output (obtained from editor.swagger.io):

```json { "swagger": "2.0", "info": { "title": "SVOD Platform", "description": "", "contact": { "name": "Digital Backstage API Team" }, "license": { "name": "MIT" }, "version": "1.0" }, "host": "svod.ucbe.rancher.preprod.digital-backstage.com", "basePath": "/", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/hal+json", "application/problem+json" ], "security": [ { "jwt": [] } ], "securityDefinitions": { "jwt": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "definitions": { "halResource": { "title": "HAL Resource Object", "type": "object", "properties": { "_links": { "type": "object", "additionalProperties": true }, "_embedded": { "type": "object", "additionalProperties": true } } }, "halAccount": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/account" } ], "example": { "_links": { "self": { "href": "/account" } }, "name": "John Smith", "preferredUsername": "john.smith@example.com", "givenName": "John", "familyName": "Smith,", "email": "john.smith@example.com", "parentalCode": "0000", "birthDate": "2000-01-01" } }, "halAvatarList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/avatars" }, "next": { "href": "/avatars?page=2" }, "first": { "href": "/avatars?page=1" }, "last": { "href": "/avatars?page=2" } }, "_embedded": { "profiles": [ { "$ref": "#/definitions/halAvatar/example" } ] } } }, "halAvatar": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/avatar" } ], "example": { "_links": { "self": { "href": "/avatars/8f6645c1f2e85dd95b5939554967f02a" } }, "hash": "8f6645c1f2e85dd95b5939554967f02a" } }, "halProfileList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/profiles" }, "next": { "href": "/profiles?page=2" }, "first": { "href": "/profiles?page=1" }, "last": { "href": "/profiles?page=2" } }, "_embedded": { "profiles": [ { "$ref": "#/definitions/halProfile/example" } ] } } }, "halProfile": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/profile" } ], "example": { "_links": { "self": { "href": "/profiles/john-smith" } }, "username": "john-smith", "displayName": "John Smith", "color": null, "avatar": "John-Smith.png", "type": "adult" } }, "halWorkList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/works" }, "next": { "href": "/works?page=2" }, "first": { "href": "/works?page=1" }, "last": { "href": "//works?page=2" } }, "_embedded": { "works": [ { "$ref": "#/definitions/halWorkMini/example" } ] } } }, "halWork": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/work" } ], "example": { "_links": { "self": { "href": "/works/md:cid:org:MYSTUDIO:29384567" }, "jobs": { "href": "/works/md:cid:org:MYSTUDIO:29384567/jobs" }, "assets": { "href": "/works/md:cid:org:MYSTUDIO:29384567/assets" } }, "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner", "releaseYear": 1982, "cover": "poster.png", "directors": [ "Denis Villeneuve" ], "runLength": "P00Y00M00DT06H08M00S", "originalTitle": "Blade Runner", "countryOfOrigin": "FR", "synopsis": "Lorem ipnum" } }, "halWorkMini": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/workMini" } ], "example": { "_links": { "self": { "href": "/works/md:cid:org:MYSTUDIO:29384567" }, "jobs": { "href": "/works/md:cid:org:MYSTUDIO:29384567/jobs" }, "assets": { "href": "/works/md:cid:org:MYSTUDIO:29384567/assets" } }, "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner", "releaseYear": 1982, "cover": "poster.png", "directors": [ "Ridley Scott" ] } }, "halWorkWatching": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/workWatching" } ], "example": { "_links": { "self": { "href": "/works/md:cid:org:MYSTUDIO:29384567" }, "jobs": { "href": "/works/md:cid:org:MYSTUDIO:29384567/jobs" }, "assets": { "href": "/works/md:cid:org:MYSTUDIO:29384567/assets" } }, "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner", "releaseYear": 1982, "cover": "poster.png", "directors": [ "Ridley Scott" ], "uuid": null, "date": "13 Juillet 2015", "event": "stop", "watchDuration": 25, "watchPercent": "67,5" } }, "halWorkTvod": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/workTvod" } ], "example": { "_links": { "self": { "href": "/works/md:cid:org:MYSTUDIO:29384567" }, "jobs": { "href": "/works/md:cid:org:MYSTUDIO:29384567/jobs" }, "assets": { "href": "/works/md:cid:org:MYSTUDIO:29384567/assets" } }, "title": "Blade Runner", "cover": "poster.png", "directors": [ "Ridley Scott" ], "price": 399, "url": "https://www.themoviedb.org/movie/78-blade-runner" } }, "halWishList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/wishes" }, "next": { "href": "/wishes?page=2" }, "first": { "href": "/wishes?page=1" }, "last": { "href": "/wishes?page=2" } }, "_embedded": { "wishes": [ { "$ref": "#/definitions/halWish/example" } ] } } }, "halWish": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/profile" } ], "example": { "_links": { "self": { "href": "/wishes/john-smith" } }, "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner" } }, "halMoodList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/moods" }, "next": { "href": "/moods?page=2" }, "first": { "href": "/moods?page=1" }, "last": { "href": "/moods?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halMood/example" } ] } } }, "halMood": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/mood" } ], "example": { "_links": { "self": { "href": "/moods/mood-1" }, "items": "/moods/mood-1/items" }, "slug": "mood-1", "title": "Cercle littéraire", "baseline": "Les meilleures adaptation de vos livres préférés", "description": null, "thumb": "thumb-mood-1.png", "picto": "picto-mood-1.png", "background": "background-mood-1.png" } }, "halThematicList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/thematics" }, "next": { "href": "/thematics?page=2" }, "first": { "href": "/thematics?page=1" }, "last": { "href": "/thematics?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halThematic/example" } ] } } }, "halThematic": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/thematic" } ], "example": { "_links": { "self": { "href": "/thematics/thematic-1" }, "items": "/thematics/thematic-1/items" }, "slug": "thematic-1", "title": "Le couple en question", "baseline": null, "description": null, "thumb": null, "background": null } }, "halAutomaticList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/automatics" }, "next": { "href": "/automatics?page=2" }, "first": { "href": "/automatics?page=1" }, "last": { "href": "/automatics?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halAutomatic/example" } ] } } }, "halHighlightList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/highlights" }, "next": { "href": "/highlights?page=2" }, "first": { "href": "/highlights?page=1" }, "last": { "href": "/highlights?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halAutomatic/example" } ] } } }, "halAutomatic": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/automatic" } ], "example": { "_links": { "self": { "href": "/automatics/automatic-1" }, "items": "/automatics/automatic-1/items" }, "slug": "automatic-1", "title": "Derniers film ajouté", "baseline": null, "description": null, "thumb": null, "background": null } }, "halHighlight": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/highlight" } ], "example": { "_links": { "self": { "href": "/highlights/highlight-1" }, "items": "/highlights/highlight-1/items" }, "slug": "highlight-1", "title": null, "baseline": null, "description": null, "thumb": null, "background": null } }, "halCycleList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/cycles" }, "next": { "href": "/cycles?page=2" }, "first": { "href": "/cycles?page=1" }, "last": { "href": "/cycles?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halCycle/example" } ] } } }, "halCycle": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/cycle" } ], "example": { "_links": { "self": { "href": "/cycles/ana-mougladisse" }, "items": "/cycles/ana-mougladisse/items" }, "slug": "ana-mougladisse", "title": "Ana Mougladisse", "baseline": null, "description": "Lorem Ipsum dolor set amet...", "thumb": "thumb-ana-mougladisse.png", "background": null } }, "halTvod": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/tvod" } ], "example": { "_links": { "self": { "href": "/tvod" }, "items": "/tvod/items" }, "title": null, "baseline": "Profitez des derniers films sortis en salle sur notre site", "description": null, "thumb": "thumb-tvod.png", "background": null } }, "halWatching": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/watching" } ], "example": { "_links": { "self": { "href": "/watching" }, "items": "/watching/items" }, "title": "Reprendre la lecture", "baseline": null, "description": null, "thumb": null, "background": null } }, "halCornerList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/corners" }, "next": { "href": "/corners?page=2" }, "first": { "href": "/corners?page=1" }, "last": { "href": "/corners?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halCorner/example-1" }, { "$ref": "#/definitions/halCorner/example-2" }, { "$ref": "#/definitions/halCorner/example-3" } ] } } }, "halCorner": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/corner" } ], "example": { "_links": { "self": { "href": "/corners/corner-1" }, "items": "/corners/corner-1/items" }, "slug": "corner-1", "title": "Collection DOCS", "baseline": "Ipsum dolor set amet", "description": "Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet", "thumb": "thumb-corner-1.png", "background": "background-corner-1.png" }, "example-1": { "_links": { "self": { "href": "/corners/corner-1" }, "items": "/corners/corner-1/items" }, "slug": "corner-1", "title": "Collection DOCS", "baseline": "Ipsum dolor set amet", "description": "Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet", "thumb": "thumb-corner-1.png", "background": "background-corner-1.png" }, "example-2": { "_links": { "self": { "href": "/corners/corner-2" }, "items": "/corners/corner-2/items" }, "slug": "corner-2", "title": "Collection Kids Only", "baseline": "Ipsum dolor set amet", "description": "Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet", "thumb": "thumb-corner-2.png", "background": "background-corner-2.png" }, "example-3": { "_links": { "self": { "href": "/corners/corner-3" }, "items": "/corners/corner-3/items" }, "slug": "corner-3", "title": "Collection We Are Belgium", "baseline": "Ipsum dolor set amet", "description": "Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet Ipsum dolor set amet", "thumb": "thumb-corner-3.png", "background": "background-corner-3.png" } }, "halLayerList": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/layers" }, "next": { "href": "/layers?page=2" }, "first": { "href": "/layers?page=1" }, "last": { "href": "/layers?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halLayer/example-highlight" }, { "$ref": "#/definitions/halLayer/example-watching" }, { "$ref": "#/definitions/halLayer/example-automatic" }, { "$ref": "#/definitions/halLayer/example-corner" }, { "$ref": "#/definitions/halLayer/example-thematic" }, { "$ref": "#/definitions/halLayer/example-cycle" }, { "$ref": "#/definitions/halLayer/example-mood" }, { "$ref": "#/definitions/halLayer/example-tvod" } ] } } }, "halLayer": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" }, { "$ref": "#/definitions/layer" } ], "example": { "layerId": "layer-1", "type": "highlight", "title": "", "picto": "", "baseline": "", "backgroundColor": "", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-1" }, "items": { "href": "http://172.19.0.4/layers/layer-1/items" } } }, "example-highlight": { "layerId": "layer-1", "type": "highlight", "title": "", "picto": "", "baseline": "", "backgroundColor": "", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-1" }, "items": { "href": "http://172.19.0.4/layers/layer-1/items" } } }, "example-watching": { "layerId": "layer-2", "type": "watching", "title": "Reprendre la lecture", "picto": "", "baseline": "", "backgroundColor": "", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-2" }, "items": { "href": "http://172.19.0.4/layers/layer-2/items" } } }, "example-automatic": { "layerId": "layer-3", "type": "automatic", "title": "Derniers films ajoutés", "picto": "", "baseline": "", "backgroundColor": "", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-3" }, "items": { "href": "http://172.19.0.4/layers/layer-3/items" } } }, "example-corner": { "layerId": "layer-4", "type": "corner", "title": "Nos Grandes Collections", "picto": "picto-layer-4.png", "baseline": "Découvrez nos grandes collections", "backgroundColor": "#3C3E47", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-4" }, "items": { "href": "http://172.19.0.4/layers/layer-4/items" } } }, "example-thematic": { "layerId": "layer-5", "type": "thematic", "title": "Le couple en question", "picto": "", "baseline": "", "backgroundColor": "", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-5" }, "items": { "href": "http://172.19.0.4/layers/layer-5/items" } } }, "example-cycle": { "layerId": "layer-6", "type": "cycle", "title": "Cycles Thématiques", "picto": "", "baseline": "Des thèmes et des personnalités mis à l'honneur chaque semaine", "backgroundColor": "#000000", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-6" }, "items": { "href": "http://172.19.0.4/layers/layer-6/items" } } }, "example-mood": { "layerId": "layer-7", "type": "mood", "title": "Mood Collections", "picto": "", "baseline": "Découvrez les films autrement", "backgroundColor": "#000000", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-7" }, "items": { "href": "http://172.19.0.4/layers/layer-7/items" } } }, "example-tvod": { "layerId": "layer-8", "type": "tvod", "title": "", "picto": "", "baseline": "Profitez des derniers films sortis en salle sur notre site", "backgroundColor": "#000000", "_links": { "self": { "href": "http://172.19.0.4/layers/layer-7" }, "items": { "href": "http://172.19.0.4/layers/layer-7/items" } } } }, "halThematicItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/thematics/thematic-1/items" }, "next": { "href": "/thematics/thematic-1/items?page=2" }, "first": { "href": "/thematics/thematic-1/items?page=1" }, "last": { "href": "/thematics/thematic-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" } ] } } }, "halCycleItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/cycles/cycle-1/items" }, "next": { "href": "/cycles/cycle-1/items?page=2" }, "first": { "href": "/cycles/cycle-1/items?page=1" }, "last": { "href": "/cycles/cycle-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" } ] } } }, "halCornerItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/corners/corner-1/items" }, "next": { "href": "/corners/corner-1/items?page=2" }, "first": { "href": "/corners/corner-1/items?page=1" }, "last": { "href": "/corners/corner-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halLayer/example-thematic" }, { "$ref": "#/definitions/halLayer/example-thematic" }, { "$ref": "#/definitions/halLayer/example-thematic" }, { "$ref": "#/definitions/halLayer/example-thematic" } ] } } }, "halMoodItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/moods/mood-1/items" }, "next": { "href": "/moods/mood-1/items?page=2" }, "first": { "href": "/moods/mood-1/items?page=1" }, "last": { "href": "/moods/mood-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" } ] } } }, "halLayerItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/layers/layer-1/items" }, "next": { "href": "/layers/layer-1/items?page=2" }, "first": { "href": "/layers/layer-1/items?page=1" }, "last": { "href": "/layers/layer-1/items?page=2" } }, "_embedded": { "items": [ null ] } } }, "halTvodItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/tvod/items" }, "next": { "href": "/tvod/items?page=2" }, "first": { "href": "/tvod/items?page=1" }, "last": { "href": "/tvod/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkTvod/example" } ] } } }, "halWatchingItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/watching/items" }, "next": { "href": "/watching/items?page=2" }, "first": { "href": "/watching/items?page=1" }, "last": { "href": "/watching/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkWatching/example" } ] } } }, "halAutomaticItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/automatics/automatics-1/items" }, "next": { "href": "/automatics/automatics-1/items?page=2" }, "first": { "href": "/automatics/automatics-1/items?page=1" }, "last": { "href": "/automatics/automatics-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" }, { "$ref": "#/definitions/halWorkMini/example" } ] } } }, "halHighlightItems": { "type": "object", "allOf": [ { "$ref": "#/definitions/halResource" } ], "example": { "_total_items": 20, "_page": 1, "_page_count": 2, "_links": { "self": { "href": "/highlights/highlights-1/items" }, "next": { "href": "/highlights/highlights-1/items?page=2" }, "first": { "href": "/highlights/highlights-1/items?page=1" }, "last": { "href": "/highlights/highlights-1/items?page=2" } }, "_embedded": { "items": [ { "$ref": "#/definitions/halWork/example" }, { "$ref": "#/definitions/halWork/example" }, { "$ref": "#/definitions/halWork/example" } ] } } }, "problemDetail": { "description": "HTTP Problem Detail (RFC 7807)\n", "required": [ "type", "status", "detail" ], "properties": { "type": { "type": "string", "default": "about:blank" }, "title": { "type": "string", "description": "Human-readable summary of the problem type.\n" }, "status": { "type": "integer", "description": "The HTTP status code for this occurrence of the problem.\n" }, "detail": { "type": "string", "description": "Human-readable explanation specific to this occurrence of the problem.\n" } } }, "Undeletable": { "type": "object", "allOf": [ { "$ref": "#/definitions/problemDetail" } ], "example": { "title": "Undeletable", "detail": "The resource is undeletable due to being used by others resources", "status": 424 } }, "AlreadyExists": { "type": "object", "allOf": [ { "$ref": "#/definitions/problemDetail" } ], "example": { "title": "Conflict", "detail": "Resource already exists", "status": 409 } }, "NotFound": { "type": "object", "allOf": [ { "$ref": "#/definitions/problemDetail" } ], "example": { "title": "Not Found", "detail": "Cannot find the requested resource", "status": 404 } }, "ValidationFailed": { "type": "object", "allOf": [ { "$ref": "#/definitions/problemDetail" } ], "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/validationMessageError" } } }, "example": { "title": "Validation failed", "detail": "Validation failed", "status": 422, "errors": [ { "$ref": "#/definitions/validationMessageError/example" } ] } }, "validationMessageError": { "type": "object", "example": { "fieldName": { "isEmpty": "is required" } } }, "avatar": { "type": "object", "properties": { "hash": { "description": "md5 hash", "type": "string" } }, "required": [ "hash" ] }, "account": { "type": "object", "properties": { "name": { "description": "Full name", "type": "string" }, "preferredUsername": { "description": "username or email", "type": "string" }, "givenName": { "description": "Given name", "type": "string" }, "familyName": { "description": "Family name", "type": "string" }, "email": { "type": "string" }, "parentalCode": { "type": "string" }, "birthDate": { "description": "The birth date (YYYY-MM-DD)", "type": "string", "format": "date" } }, "required": [ "name", "preferredUsername", "email" ] }, "accountPatch": { "type": "object", "properties": { "parentalCode": { "type": "string" }, "birthDate": { "description": "The birth date (YYYY-MM-DD)", "type": "string", "format": "date" } }, "example": { "birthDate": "2000-01-01", "parentalCode": "0000" } }, "profilePatch": { "type": "object", "allOf": [ { "$ref": "#/definitions/profile" } ], "example": { "color": null } }, "profile": { "type": "object", "properties": { "displayName": { "description": "Name to display", "type": "string" }, "color": { "description": "Hexa code of color", "type": "string" }, "avatar": { "type": "string" }, "type": { "type": "string", "enum": [ "adult", "kid" ] } }, "required": [ "displayName", "type" ], "example": { "displayName": "John Smith", "color": null, "avatar": "John-Smith.png", "type": "adult" } }, "work": { "allOf": [ { "$ref": "#/definitions/workNew" } ], "properties": { "identifier": { "description": "ID internally generated to uniquely identify an avail.", "type": "string" } }, "required": [ "identifier" ] }, "workNew": { "required": [ "contentId", "workType", "originalTitle", "countyOfOrigin", "releaseDate", "runLength", "language", "title" ], "properties": { "contentId": { "description": "The content id as defined in EMA specs", "type": "string" }, "language": { "description": "The language as defined by RFC 5646 / BCP 47 (ie. 'fr-FR')", "type": "string" } }, "allOf": [ { "$ref": "#/definitions/workPatch" } ] }, "workPatch": { "type": "object", "properties": { "workType": { "description": "The type of work", "type": "string", "enum": [ "Movie", "Short", "Series", "Season", "Episode", "Non-episodic Show", "Promotional", "Ad" ] }, "originalTitle": { "description": "The original title", "type": "string" }, "countyOfOrigin": { "description": "Country of origin. (ISO 3166-1 alpha-2 country code for the country)", "type": "string" }, "releaseDate": { "description": "The release date (YYYY-MM-DD)", "type": "string", "format": "date" }, "runLength": { "description": "The duration (In a time interval represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S)", "type": "string" }, "title": { "description": "The translated title in given language", "type": "string" }, "cover": { "description": "The translated title in given language", "type": "string" }, "directors": { "description": "The translated title in given language", "type": "array", "items": { "type": "string" } }, "synopsis": { "description": "The translated title in given language", "type": "string" } } }, "workMini": { "type": "object", "properties": { "contentId": { "description": "The content id as defined in EMA specs", "type": "string" }, "workType": { "description": "The work as defined in EMA specs", "type": "string" }, "title": { "type": "string" }, "releaseDate": { "description": "The release date (YYYY-MM-DD)", "type": "string", "format": "date" }, "cover": { "type": "string" }, "directors": { "type": "array", "items": { "type": "string" } } }, "required": [ "contentId" ], "example": { "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner", "releaseYear": 2017, "cover": "poster.png", "directors": [ "Denis Villeneuve" ] } }, "wish": { "type": "object", "properties": { "contentId": { "description": "The content id as defined in EMA specs", "type": "string" }, "workType": { "description": "The work as defined in EMA specs", "type": "string" }, "title": { "type": "string" } }, "required": [ "contentId" ], "example": { "contentId": "md:cid:org:MYSTUDIO:29384567", "workType": "Movie", "title": "Blade Runner" } }, "thematic": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug", "title" ] }, "mood": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "picto": { "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug", "title" ] }, "cycle": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug", "title" ] }, "corner": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug", "title" ] }, "tvod": { "type": "object", "properties": { "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } } }, "workTvod": { "type": "object", "properties": { "title": { "type": "string" }, "cover": { "type": "string" }, "directors": { "type": "array", "items": { "type": "string" } }, "price": { "type": "integer" }, "url": { "type": "string" } }, "required": [ "title", "url" ], "example": { "title": "Blade Runner", "cover": "poster.png", "directors": [ "Ridley Scott" ], "price": 399, "url": "https://www.themoviedb.org/movie/78-blade-runner" } }, "watching": { "type": "object", "properties": { "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } } }, "workWatching": { "type": "object", "properties": { "contentId": { "description": "The content id as defined in EMA specs", "type": "string" }, "workType": { "description": "The work as defined in EMA specs", "type": "string" }, "title": { "type": "string" }, "releaseDate": { "description": "The release date (YYYY-MM-DD)", "type": "string", "format": "date" }, "cover": { "type": "string" }, "directors": { "type": "array", "items": { "type": "string" } }, "uuid": { "type": "string" }, "date": { "type": "string" }, "event": { "type": "string" }, "watchDuration": { "type": "integer" }, "watchPercent": { "type": "number" } }, "required": [ "contentId" ] }, "automatic": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug", "title" ] }, "highlight": { "type": "object", "properties": { "slug": { "description": "Slug of title", "type": "string" }, "title": { "description": "Title", "type": "string" }, "baseline": { "description": "Baseline", "type": "string" }, "description": { "description": "Description", "type": "string" }, "thumb": { "description": "Thumb", "type": "string" }, "background": { "description": "Thumb", "type": "string" } }, "required": [ "slug" ] }, "layer": { "type": "object", "properties": { "layerId": { "description": "Layer identifier", "type": "string" }, "type": { "description": "Title", "type": "string", "enum": [ "highlight", "corner", "cycle", "mood", "thematic", "watching", "tvod", "automatic" ] }, "title": { "description": "Title of the layer", "type": "string" }, "baseline": { "description": "Baseline of the layer", "type": "string" }, "picto": { "description": "Picto", "type": "string" }, "backgoundColoe": { "description": "RGB Code", "type": "string" } }, "required": [ "layerId", "type" ] } }, "paths": { "/account": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" } ], "tags": [ "Account" ], "summary": "Account infos", "description": "Returns account infos", "responses": { "200": { "description": "An account", "schema": { "$ref": "#/definitions/halAccount" } } } }, "patch": { "tags": [ "Account" ], "summary": "Update or create a profile", "description": "Update or create a profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "profile", "in": "body", "schema": { "$ref": "#/definitions/accountPatch" } } ], "responses": { "204": { "description": "Successfully updated" }, "404": { "description": "The requested profile wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } } }, "/avatars": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" } ], "tags": [ "Profile" ], "summary": "List avatars", "description": "Returns list of avatars", "responses": { "200": { "description": "An avatar", "schema": { "$ref": "#/definitions/halAvatar" } } } } }, "/avatars/{hash}": { "get": { "tags": [ "Profile" ], "summary": "Return image", "description": "Returns a single profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "hash", "in": "path", "required": true, "type": "string" } ], "produces": [ "image/*" ], "responses": { "200": { "description": "Success" }, "404": { "description": "The requested avatar wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/profiles": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" } ], "tags": [ "Profile" ], "summary": "List profiles", "description": "Retrieve a list of profiles.", "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halProfileList" } } } } }, "/profiles/{username}": { "get": { "tags": [ "Profile" ], "summary": "Find profile by its slug", "description": "Returns a single profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "username", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "A Profile", "schema": { "$ref": "#/definitions/halProfile" } }, "404": { "description": "The requested profile wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } }, "delete": { "summary": "Delete a profile", "tags": [ "Profile" ], "description": "Delete a previously registered profile.\n", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "username", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "Operation success" }, "404": { "description": "The requested profile wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "424": { "description": "Profile wasn't deletable", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/Undeletable" } } } }, "put": { "tags": [ "Profile" ], "summary": "Update or create a profile", "description": "Update or create a profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "username", "in": "path", "required": true, "type": "string" }, { "name": "profile", "in": "body", "required": true, "schema": { "$ref": "#/definitions/profilePatch" } } ], "responses": { "204": { "description": "Successfully updated" }, "404": { "description": "The requested profile wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } }, "patch": { "tags": [ "Profile" ], "summary": "Partial update a profile", "description": "Partial update a profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "username", "in": "path", "required": true, "type": "string" }, { "name": "profile", "in": "body", "required": true, "schema": { "$ref": "#/definitions/profilePatch" } } ], "responses": { "204": { "description": "Successfully patched" }, "404": { "description": "The requested profile wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } } }, "/wishes": { "get": { "tags": [ "Profile" ], "summary": "Wishlist of a profile", "description": "Return the wishlist of the given profile", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "X-Account-Profile", "in": "header", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "type": "array", "items": { "$ref": "#/definitions/halWishList" } } } } } }, "/wishes/{contentId}": { "put": { "tags": [ "Profile" ], "summary": "To add a work to the profile's wishlist", "description": "Add work to wishlist", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "X-Account-Profile", "in": "header", "required": true, "type": "string" }, { "name": "contentId", "in": "path", "required": true, "type": "string", "description": "The content Id as defined in EMA md." } ], "responses": { "201": { "description": "Successfully created" }, "404": { "description": "The requested wish wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } }, "delete": { "tags": [ "Profile" ], "summary": "Delete work from wishlist", "description": "Delete work from wishlist", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string" }, { "name": "X-Account-Profile", "in": "header", "required": true, "type": "string" }, { "name": "contentId", "in": "path", "required": true, "type": "string", "description": "The content Id as defined in EMA md." } ], "responses": { "204": { "description": "Successfully deleted" }, "404": { "description": "The requested wish wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } } }, "/works": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Work" ], "description": "List of works", "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halWorkList" } } } }, "post": { "tags": [ "Work" ], "summary": "To create a work", "description": "Create a new work", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "work", "in": "body", "description": "The content idendtifier.", "required": true, "schema": { "$ref": "#/definitions/work" } } ], "responses": { "201": { "description": "Successfully created" }, "409": { "description": "The work already exists", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/AlreadyExists" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } } }, "/works/{contentId}": { "get": { "tags": [ "Work" ], "description": "Get work given its contentId and language", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "contentId", "in": "path", "description": "Content identifier", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halWork" } }, "404": { "description": "The requested work wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } }, "delete": { "tags": [ "Work" ], "description": "Delete work given its contentId and language", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "name": "contentId", "in": "path", "description": "Content identifier", "required": true, "type": "string" } ], "responses": { "204": { "description": "Operation success" }, "404": { "description": "The requested work wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "417": { "description": "Expectation failed" } } }, "patch": { "tags": [ "Work" ], "description": "Delete work given its contentId and language", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "contentId", "in": "path", "description": "Content identifier", "required": true, "type": "string" }, { "name": "work", "in": "body", "description": "Update or transalate a work", "required": true, "schema": { "$ref": "#/definitions/workPatch" } } ], "responses": { "204": { "description": "Operation success" }, "404": { "description": "The requested work wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } }, "422": { "description": "Validation Failed", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/ValidationFailed" } } } } }, "/thematics": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List thematics", "description": "Returns list of thematics", "responses": { "200": { "description": "A thematic", "schema": { "$ref": "#/definitions/halThematicList" } } } } }, "/thematics/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get thematic given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Thematic slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halThematic" } }, "404": { "description": "The requested thematic wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/thematics/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of thematic given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Thematic slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halThematicItems" } }, "404": { "description": "The requested thematic wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/moods": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List moods", "description": "Returns list of moods", "responses": { "200": { "description": "A mood", "schema": { "$ref": "#/definitions/halMoodList" } } } } }, "/moods/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get mood given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Mood slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halMood" } }, "404": { "description": "The requested mood wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/moods/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of mood given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Mood slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halMoodItems" } }, "404": { "description": "The requested mood wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/cycles": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List cycles", "description": "Returns list of cycles", "responses": { "200": { "description": "Success Response", "schema": { "$ref": "#/definitions/halCycleList" } } } } }, "/cycles/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get cycle given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Cycle slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halCycle" } }, "404": { "description": "The requested cycle wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/cycles/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of cycle given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Cycle slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halCycleItems" } }, "404": { "description": "The requested cycle wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/corners": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List corners", "description": "Returns list of corners", "responses": { "200": { "description": "A corner", "schema": { "$ref": "#/definitions/halCornerList" } } } } }, "/corners/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get corner given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Corner slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halCorner" } }, "404": { "description": "The requested corner wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/corners/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of corner given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Corner slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halCornerItems" } }, "404": { "description": "The requested corner wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/home": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "Homepage", "description": "Returns list of Home layers ", "responses": { "200": { "description": "Layers list", "schema": { "$ref": "#/definitions/halLayerList" } } } } }, "/layers": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List layers", "description": "Returns list of layers", "responses": { "200": { "description": "Layers list", "schema": { "$ref": "#/definitions/halLayerList" } } } } }, "/layers/{layerId}": { "get": { "tags": [ "Edito" ], "description": "Get layer given its identifier", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "layerId", "in": "path", "description": "Layer identifier", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halLayer" } }, "404": { "description": "The requested layer wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/layers/{layerId}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of layer given its Id", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR, fr-BE, nl-BE)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "layerId", "in": "path", "description": "layer identification", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halLayerItems" } }, "404": { "description": "The requested corner wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/tvod": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List tvods", "description": "Returns tvod layer", "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halTvod" } } } } }, "/tvod/items": { "get": { "tags": [ "Edito" ], "description": "Get items of TVOD given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halTvodItems" } }, "404": { "description": "The requested TVOD wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/watching": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List current unfinished movies", "description": "Returns watching layer", "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halWatching" } } } } }, "/watching/items": { "get": { "tags": [ "Edito" ], "description": "Get items of watching", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halWatchingItems" } }, "404": { "description": "The requested watching items wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/automatics": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List automatic", "description": "Returns list of automatics theme, example : a slider of movies from query in Elastic Search, Last added movies", "responses": { "200": { "description": "Success Response", "schema": { "$ref": "#/definitions/halAutomaticList" } } } } }, "/automatics/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get automatic given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Automatic slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halAutomatic" } }, "404": { "description": "The requested automatic wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/automatics/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of automatic given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Automatic slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halAutomaticItems" } }, "404": { "description": "The requested automatic wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/highlights": { "get": { "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true } ], "tags": [ "Edito" ], "summary": "List highlight", "description": "Returns list of highlights", "responses": { "200": { "description": "Success Response", "schema": { "$ref": "#/definitions/halHighlightList" } } } } }, "/highlights/{slug}": { "get": { "tags": [ "Edito" ], "description": "Get highlight given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Highlight slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halHighlight" } }, "404": { "description": "The requested highlight wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } }, "/highlights/{slug}/items": { "get": { "tags": [ "Edito" ], "description": "Get items of highlight given its slug", "parameters": [ { "description": "The desired language for the Metadata specified in IANA (ie: fr-FR)", "in": "header", "name": "Accept-Language", "type": "string", "required": true }, { "name": "slug", "in": "path", "description": "Highlight slug", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success response", "schema": { "$ref": "#/definitions/halHighlightItems" } }, "404": { "description": "The requested highlight wasn't found", "headers": { "Content-Type": { "type": "string", "default": "application/problem+json" } }, "schema": { "$ref": "#/definitions/NotFound" } } } } } } } ```

Actual output:

```json { "swagger" : "2.0", "info" : { "description" : "", "version" : "1.0", "title" : "SVOD Platform", "contact" : { "name" : "Digital Backstage API Team" }, "license" : { "name" : "MIT" } }, "basePath" : "/", "schemes" : [ "https", "http" ], "consumes" : [ "application/json" ], "produces" : [ "application/hal+json", "application/problem+json" ], "security" : [ { "jwt" : [ ] } ], "paths" : { "/account" : { "get" : { "tags" : [ "Account" ], "summary" : "Account infos", "description" : "Returns account infos", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" } ], "responses" : { "200" : { "description" : "An account", "schema" : { "$ref" : "#/definitions/halAccount" } } } }, "patch" : { "tags" : [ "Account" ], "summary" : "Update or create a profile", "description" : "Update or create a profile", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "in" : "body", "name" : "profile", "required" : false, "schema" : { "$ref" : "#/definitions/accountPatch" } } ], "responses" : { "204" : { "description" : "Successfully updated" }, "404" : { "description" : "The requested profile wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/avatars" : { "get" : { "tags" : [ "Profile" ], "summary" : "List avatars", "description" : "Returns list of avatars", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" } ], "responses" : { "200" : { "description" : "An avatar", "schema" : { "$ref" : "#/definitions/halAvatar" } } } } }, "/avatars/{hash}" : { "get" : { "tags" : [ "Profile" ], "summary" : "Return image", "description" : "Returns a single profile", "produces" : [ "image/*" ], "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "hash", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success" }, "404" : { "description" : "The requested avatar wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/profiles" : { "get" : { "tags" : [ "Profile" ], "summary" : "List profiles", "description" : "Retrieve a list of profiles.", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halProfileList" } } } } }, "/profiles/{username}" : { "get" : { "tags" : [ "Profile" ], "summary" : "Find profile by its slug", "description" : "Returns a single profile", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "username", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "A Profile", "schema" : { "$ref" : "#/definitions/halProfile" } }, "404" : { "description" : "The requested profile wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } }, "put" : { "tags" : [ "Profile" ], "summary" : "Update or create a profile", "description" : "Update or create a profile", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "username", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "profile", "required" : true, "schema" : { "$ref" : "#/definitions/profilePatch" } } ], "responses" : { "204" : { "description" : "Successfully updated" }, "404" : { "description" : "The requested profile wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } }, "delete" : { "tags" : [ "Profile" ], "summary" : "Delete a profile", "description" : "Delete a previously registered profile.\n", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "username", "in" : "path", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Operation success" }, "404" : { "description" : "The requested profile wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "424" : { "description" : "Profile wasn't deletable", "schema" : { "$ref" : "#/definitions/Undeletable" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } }, "patch" : { "tags" : [ "Profile" ], "summary" : "Partial update a profile", "description" : "Partial update a profile", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "username", "in" : "path", "required" : true, "type" : "string" }, { "in" : "body", "name" : "profile", "required" : true, "schema" : { "$ref" : "#/definitions/profilePatch" } } ], "responses" : { "204" : { "description" : "Successfully patched" }, "404" : { "description" : "The requested profile wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/wishes" : { "get" : { "tags" : [ "Profile" ], "summary" : "Wishlist of a profile", "description" : "Return the wishlist of the given profile", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "X-Account-Profile", "in" : "header", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "type" : "array", "items" : { "$ref" : "#/definitions/halWishList" } } } } } }, "/wishes/{contentId}" : { "put" : { "tags" : [ "Profile" ], "summary" : "To add a work to the profile's wishlist", "description" : "Add work to wishlist", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "X-Account-Profile", "in" : "header", "required" : true, "type" : "string" }, { "name" : "contentId", "in" : "path", "description" : "The content Id as defined in EMA md.", "required" : true, "type" : "string" } ], "responses" : { "201" : { "description" : "Successfully created" }, "404" : { "description" : "The requested wish wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } }, "delete" : { "tags" : [ "Profile" ], "summary" : "Delete work from wishlist", "description" : "Delete work from wishlist", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : false, "type" : "string" }, { "name" : "X-Account-Profile", "in" : "header", "required" : true, "type" : "string" }, { "name" : "contentId", "in" : "path", "description" : "The content Id as defined in EMA md.", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Successfully deleted" }, "404" : { "description" : "The requested wish wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/works" : { "get" : { "tags" : [ "Work" ], "description" : "List of works", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halWorkList" } } } }, "post" : { "tags" : [ "Work" ], "summary" : "To create a work", "description" : "Create a new work", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "in" : "body", "name" : "work", "description" : "The content idendtifier.", "required" : true, "schema" : { "$ref" : "#/definitions/work" } } ], "responses" : { "201" : { "description" : "Successfully created" }, "409" : { "description" : "The work already exists", "schema" : { "$ref" : "#/definitions/AlreadyExists" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/works/{contentId}" : { "get" : { "tags" : [ "Work" ], "description" : "Get work given its contentId and language", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "contentId", "in" : "path", "description" : "Content identifier", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halWork" } }, "404" : { "description" : "The requested work wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } }, "delete" : { "tags" : [ "Work" ], "description" : "Delete work given its contentId and language", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "contentId", "in" : "path", "description" : "Content identifier", "required" : true, "type" : "string" } ], "responses" : { "204" : { "description" : "Operation success" }, "404" : { "description" : "The requested work wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "417" : { "description" : "Expectation failed" } } }, "patch" : { "tags" : [ "Work" ], "description" : "Delete work given its contentId and language", "consumes" : [ "application/json" ], "produces" : [ "application/json" ], "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "contentId", "in" : "path", "description" : "Content identifier", "required" : true, "type" : "string" }, { "in" : "body", "name" : "work", "description" : "Update or transalate a work", "required" : true, "schema" : { "$ref" : "#/definitions/workPatch" } } ], "responses" : { "204" : { "description" : "Operation success" }, "404" : { "description" : "The requested work wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } }, "422" : { "description" : "Validation Failed", "schema" : { "$ref" : "#/definitions/ValidationFailed" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/thematics" : { "get" : { "tags" : [ "Edito" ], "summary" : "List thematics", "description" : "Returns list of thematics", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "A thematic", "schema" : { "$ref" : "#/definitions/halThematicList" } } } } }, "/thematics/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get thematic given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Thematic slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halThematic" } }, "404" : { "description" : "The requested thematic wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/thematics/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of thematic given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Thematic slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halThematicItems" } }, "404" : { "description" : "The requested thematic wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/moods" : { "get" : { "tags" : [ "Edito" ], "summary" : "List moods", "description" : "Returns list of moods", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "A mood", "schema" : { "$ref" : "#/definitions/halMoodList" } } } } }, "/moods/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get mood given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Mood slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halMood" } }, "404" : { "description" : "The requested mood wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/moods/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of mood given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Mood slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halMoodItems" } }, "404" : { "description" : "The requested mood wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/cycles" : { "get" : { "tags" : [ "Edito" ], "summary" : "List cycles", "description" : "Returns list of cycles", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success Response", "schema" : { "$ref" : "#/definitions/halCycleList" } } } } }, "/cycles/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get cycle given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Cycle slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halCycle" } }, "404" : { "description" : "The requested cycle wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/cycles/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of cycle given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Cycle slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halCycleItems" } }, "404" : { "description" : "The requested cycle wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/corners" : { "get" : { "tags" : [ "Edito" ], "summary" : "List corners", "description" : "Returns list of corners", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "A corner", "schema" : { "$ref" : "#/definitions/halCornerList" } } } } }, "/corners/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get corner given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Corner slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halCorner" } }, "404" : { "description" : "The requested corner wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/corners/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of corner given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Corner slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halCornerItems" } }, "404" : { "description" : "The requested corner wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/home" : { "get" : { "tags" : [ "Edito" ], "summary" : "Homepage", "description" : "Returns list of Home layers ", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Layers list", "schema" : { "$ref" : "#/definitions/halLayerList" } } } } }, "/layers" : { "get" : { "tags" : [ "Edito" ], "summary" : "List layers", "description" : "Returns list of layers", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Layers list", "schema" : { "$ref" : "#/definitions/halLayerList" } } } } }, "/layers/{layerId}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get layer given its identifier", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "layerId", "in" : "path", "description" : "Layer identifier", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halLayer" } }, "404" : { "description" : "The requested layer wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/layers/{layerId}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of layer given its Id", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR, fr-BE, nl-BE)", "required" : true, "type" : "string" }, { "name" : "layerId", "in" : "path", "description" : "layer identification", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halLayerItems" } }, "404" : { "description" : "The requested corner wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/tvod" : { "get" : { "tags" : [ "Edito" ], "summary" : "List tvods", "description" : "Returns tvod layer", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halTvod" } } } } }, "/tvod/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of TVOD given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halTvodItems" } }, "404" : { "description" : "The requested TVOD wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/watching" : { "get" : { "tags" : [ "Edito" ], "summary" : "List current unfinished movies", "description" : "Returns watching layer", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halWatching" } } } } }, "/watching/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of watching", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halWatchingItems" } }, "404" : { "description" : "The requested watching items wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/automatics" : { "get" : { "tags" : [ "Edito" ], "summary" : "List automatic", "description" : "Returns list of automatics theme, example : a slider of movies from query in Elastic Search, Last added movies", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success Response", "schema" : { "$ref" : "#/definitions/halAutomaticList" } } } } }, "/automatics/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get automatic given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Automatic slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halAutomatic" } }, "404" : { "description" : "The requested automatic wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/automatics/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of automatic given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Automatic slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halAutomaticItems" } }, "404" : { "description" : "The requested automatic wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/highlights" : { "get" : { "tags" : [ "Edito" ], "summary" : "List highlight", "description" : "Returns list of highlights", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success Response", "schema" : { "$ref" : "#/definitions/halHighlightList" } } } } }, "/highlights/{slug}" : { "get" : { "tags" : [ "Edito" ], "description" : "Get highlight given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Highlight slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halHighlight" } }, "404" : { "description" : "The requested highlight wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } }, "/highlights/{slug}/items" : { "get" : { "tags" : [ "Edito" ], "description" : "Get items of highlight given its slug", "parameters" : [ { "name" : "Accept-Language", "in" : "header", "description" : "The desired language for the Metadata specified in IANA (ie: fr-FR)", "required" : true, "type" : "string" }, { "name" : "slug", "in" : "path", "description" : "Highlight slug", "required" : true, "type" : "string" } ], "responses" : { "200" : { "description" : "Success response", "schema" : { "$ref" : "#/definitions/halHighlightItems" } }, "404" : { "description" : "The requested highlight wasn't found", "schema" : { "$ref" : "#/definitions/NotFound" }, "headers" : { "Content-Type" : { "type" : "string", "default" : "application/problem+json" } } } } } } }, "securityDefinitions" : { "jwt" : { "type" : "apiKey", "name" : "Authorization", "in" : "header" } }, "definitions" : { "halResource" : { "type" : "object", "properties" : { "_links" : { "type" : "object", "properties" : { } }, "_embedded" : { "type" : "object", "properties" : { } } }, "title" : "HAL Resource Object" }, "halAccount" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/account" } ] }, "halAvatarList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halAvatar" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/avatar" } ] }, "halProfileList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halProfile" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/profile" } ] }, "halWorkList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halWork" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/work" } ] }, "halWorkMini" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/workMini" } ] }, "halWorkWatching" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/workWatching" } ] }, "halWorkTvod" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/workTvod" } ] }, "halWishList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halWish" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/profile" } ] }, "halMoodList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halMood" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/mood" } ] }, "halThematicList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halThematic" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/thematic" } ] }, "halAutomaticList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halHighlightList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halAutomatic" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/automatic" } ] }, "halHighlight" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/highlight" } ] }, "halCycleList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halCycle" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/cycle" } ] }, "halTvod" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/tvod" } ] }, "halWatching" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/watching" } ] }, "halCornerList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halCorner" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/corner" } ] }, "halLayerList" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halLayer" : { "allOf" : [ { "$ref" : "#/definitions/halResource" }, { "$ref" : "#/definitions/layer" } ] }, "halThematicItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halCycleItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halCornerItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halMoodItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halLayerItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halTvodItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halWatchingItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halAutomaticItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "halHighlightItems" : { "allOf" : [ { "$ref" : "#/definitions/halResource" } ] }, "problemDetail" : { "required" : [ "detail", "status", "type" ], "properties" : { "type" : { "type" : "string", "default" : "about:blank" }, "title" : { "type" : "string", "description" : "Human-readable summary of the problem type.\n" }, "status" : { "type" : "integer", "description" : "The HTTP status code for this occurrence of the problem.\n" }, "detail" : { "type" : "string", "description" : "Human-readable explanation specific to this occurrence of the problem.\n" } }, "description" : "HTTP Problem Detail (RFC 7807)\n" }, "Undeletable" : { "allOf" : [ { "$ref" : "#/definitions/problemDetail" } ] }, "AlreadyExists" : { "allOf" : [ { "$ref" : "#/definitions/problemDetail" } ] }, "NotFound" : { "allOf" : [ { "$ref" : "#/definitions/problemDetail" } ] }, "ValidationFailed" : { "allOf" : [ { "$ref" : "#/definitions/problemDetail" } ] }, "validationMessageError" : { "type" : "object", "example" : { "fieldName" : { "isEmpty" : "is required" } } }, "avatar" : { "type" : "object", "required" : [ "hash" ], "properties" : { "hash" : { "type" : "string", "description" : "md5 hash" } } }, "account" : { "type" : "object", "required" : [ "email", "name", "preferredUsername" ], "properties" : { "name" : { "type" : "string", "description" : "Full name" }, "preferredUsername" : { "type" : "string", "description" : "username or email" }, "givenName" : { "type" : "string", "description" : "Given name" }, "familyName" : { "type" : "string", "description" : "Family name" }, "email" : { "type" : "string" }, "parentalCode" : { "type" : "string" }, "birthDate" : { "type" : "string", "format" : "date", "description" : "The birth date (YYYY-MM-DD)" } } }, "accountPatch" : { "type" : "object", "properties" : { "parentalCode" : { "type" : "string" }, "birthDate" : { "type" : "string", "format" : "date", "description" : "The birth date (YYYY-MM-DD)" } }, "example" : { "birthDate" : "2000-01-01", "parentalCode" : "0000" } }, "profilePatch" : { "allOf" : [ { "$ref" : "#/definitions/profile" } ] }, "profile" : { "type" : "object", "required" : [ "displayName", "type" ], "properties" : { "displayName" : { "type" : "string", "description" : "Name to display" }, "color" : { "type" : "string", "description" : "Hexa code of color" }, "avatar" : { "type" : "string" }, "type" : { "type" : "string", "enum" : [ "adult", "kid" ] } }, "example" : { "displayName" : "John Smith", "color" : null, "avatar" : "John-Smith.png", "type" : "adult" } }, "work" : { "allOf" : [ { "$ref" : "#/definitions/workNew" } ] }, "workNew" : { "allOf" : [ { "$ref" : "#/definitions/workPatch" } ] }, "workPatch" : { "type" : "object", "properties" : { "workType" : { "type" : "string", "description" : "The type of work", "enum" : [ "Movie", "Short", "Series", "Season", "Episode", "Non-episodic Show", "Promotional", "Ad" ] }, "originalTitle" : { "type" : "string", "description" : "The original title" }, "countyOfOrigin" : { "type" : "string", "description" : "Country of origin. (ISO 3166-1 alpha-2 country code for the country)" }, "releaseDate" : { "type" : "string", "format" : "date", "description" : "The release date (YYYY-MM-DD)" }, "runLength" : { "type" : "string", "description" : "The duration (In a time interval represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S)" }, "title" : { "type" : "string", "description" : "The translated title in given language" }, "cover" : { "type" : "string", "description" : "The translated title in given language" }, "directors" : { "type" : "array", "description" : "The translated title in given language", "items" : { "type" : "string" } }, "synopsis" : { "type" : "string", "description" : "The translated title in given language" } } }, "workMini" : { "type" : "object", "required" : [ "contentId" ], "properties" : { "contentId" : { "type" : "string", "description" : "The content id as defined in EMA specs" }, "workType" : { "type" : "string", "description" : "The work as defined in EMA specs" }, "title" : { "type" : "string" }, "releaseDate" : { "type" : "string", "format" : "date", "description" : "The release date (YYYY-MM-DD)" }, "cover" : { "type" : "string" }, "directors" : { "type" : "array", "items" : { "type" : "string" } } }, "example" : { "contentId" : "md:cid:org:MYSTUDIO:29384567", "workType" : "Movie", "title" : "Blade Runner", "releaseYear" : 2017, "cover" : "poster.png", "directors" : [ "Denis Villeneuve" ] } }, "wish" : { "type" : "object", "required" : [ "contentId" ], "properties" : { "contentId" : { "type" : "string", "description" : "The content id as defined in EMA specs" }, "workType" : { "type" : "string", "description" : "The work as defined in EMA specs" }, "title" : { "type" : "string" } }, "example" : { "contentId" : "md:cid:org:MYSTUDIO:29384567", "workType" : "Movie", "title" : "Blade Runner" } }, "thematic" : { "type" : "object", "required" : [ "slug", "title" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "mood" : { "type" : "object", "required" : [ "slug", "title" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "picto" : { "type" : "string" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "cycle" : { "type" : "object", "required" : [ "slug", "title" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "corner" : { "type" : "object", "required" : [ "slug", "title" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "tvod" : { "type" : "object", "properties" : { "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "workTvod" : { "type" : "object", "required" : [ "title", "url" ], "properties" : { "title" : { "type" : "string" }, "cover" : { "type" : "string" }, "directors" : { "type" : "array", "items" : { "type" : "string" } }, "price" : { "type" : "integer" }, "url" : { "type" : "string" } }, "example" : { "title" : "Blade Runner", "cover" : "poster.png", "directors" : [ "Ridley Scott" ], "price" : 399, "url" : "https://www.themoviedb.org/movie/78-blade-runner" } }, "watching" : { "type" : "object", "properties" : { "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "workWatching" : { "type" : "object", "required" : [ "contentId" ], "properties" : { "contentId" : { "type" : "string", "description" : "The content id as defined in EMA specs" }, "workType" : { "type" : "string", "description" : "The work as defined in EMA specs" }, "title" : { "type" : "string" }, "releaseDate" : { "type" : "string", "format" : "date", "description" : "The release date (YYYY-MM-DD)" }, "cover" : { "type" : "string" }, "directors" : { "type" : "array", "items" : { "type" : "string" } }, "uuid" : { "type" : "string" }, "date" : { "type" : "string" }, "event" : { "type" : "string" }, "watchDuration" : { "type" : "integer" }, "watchPercent" : { "type" : "number" } } }, "automatic" : { "type" : "object", "required" : [ "slug", "title" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "highlight" : { "type" : "object", "required" : [ "slug" ], "properties" : { "slug" : { "type" : "string", "description" : "Slug of title" }, "title" : { "type" : "string", "description" : "Title" }, "baseline" : { "type" : "string", "description" : "Baseline" }, "description" : { "type" : "string", "description" : "Description" }, "thumb" : { "type" : "string", "description" : "Thumb" }, "background" : { "type" : "string", "description" : "Thumb" } } }, "layer" : { "type" : "object", "required" : [ "layerId", "type" ], "properties" : { "layerId" : { "type" : "string", "description" : "Layer identifier" }, "type" : { "type" : "string", "description" : "Title", "enum" : [ "highlight", "corner", "cycle", "mood", "thematic", "watching", "tvod", "automatic" ] }, "title" : { "type" : "string", "description" : "Title of the layer" }, "baseline" : { "type" : "string", "description" : "Baseline of the layer" }, "picto" : { "type" : "string", "description" : "Picto" }, "backgoundColoe" : { "type" : "string", "description" : "RGB Code" } } } } } ```
Command line used for generation

generate -i /docs/swagger.yml -l swagger -o /docs

Steps to reproduce

download the yaml and run docker-compose run --user=$(id -u) --rm swagger-codegen

greg0ire commented 6 years ago

I think this is invalid, because I started of with an invalid YAML (thought it was fine, but really wasn't). Sorry for the disturbance.

etherealjoy commented 6 years ago

You can close it yourself right? I think we can close issues we created by ourselves.

greg0ire commented 6 years ago

Woops sorry I forgot to, you're right.