Last active
June 30, 2023 09:07
-
-
Save AJNOURI/34f3302b223985cd068fab10a9dbf2a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.0" | |
info: | |
description: "Please add description" | |
version: "0.1.0_inProgress" | |
title: "Orange_device_ressources" | |
tags: | |
- name: "Device" | |
- name: "OrangeApiStatus" | |
paths: | |
/devices: | |
get: | |
tags: | |
- "Device" | |
operationId: "deviceFind" | |
summary: "find device" | |
parameters: | |
- name: "brand" | |
required: false | |
in: "query" | |
schema: | |
$ref: "#/components/schemas/Brand" | |
responses: | |
"200": | |
description: "Ok" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
type: "array" | |
items: | |
$ref: "#/components/schemas/Device" | |
"400": | |
description: "Bad Request\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"404": | |
description: "Not Found\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"405": | |
description: "Method Not Allowed\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"422": | |
description: "Unprocessable entity\n\nBusiness error" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"500": | |
description: "Internal Server Error\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"503": | |
description: "Service Unavailable\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
/devices/{deviceId}: | |
get: | |
tags: | |
- "Device" | |
operationId: "deviceGet" | |
summary: "get device" | |
parameters: | |
- name: "deviceId" | |
required: true | |
in: "path" | |
schema: | |
type: "string" | |
responses: | |
"200": | |
description: "Ok" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/Device" | |
"400": | |
description: "Bad Request\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"404": | |
description: "Not Found\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"405": | |
description: "Method Not Allowed\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"422": | |
description: "Unprocessable entity\n\nBusiness error" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"500": | |
description: "Internal Server Error\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"503": | |
description: "Service Unavailable\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
/status: | |
post: | |
tags: | |
- "OrangeApiStatus" | |
operationId: "orangeApiStatusCreate" | |
summary: "create orangeApiStatus" | |
requestBody: | |
required: true | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiStatus" | |
responses: | |
"201": | |
description: "Created" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiStatus" | |
"400": | |
description: "Bad Request\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"404": | |
description: "Not Found\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"405": | |
description: "Method Not Allowed\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"422": | |
description: "Unprocessable entity\n\nBusiness error" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"500": | |
description: "Internal Server Error\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"503": | |
description: "Service Unavailable\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
get: | |
tags: | |
- "OrangeApiStatus" | |
operationId: "statusGet" | |
summary: "get status" | |
description: "See [Orange recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)" | |
responses: | |
"200": | |
description: "Ok" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiStatus" | |
"400": | |
description: "Bad Request\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"404": | |
description: "Not Found\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"405": | |
description: "Method Not Allowed\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"422": | |
description: "Unprocessable entity\n\nBusiness error" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"500": | |
description: "Internal Server Error\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"503": | |
description: "Service Unavailable\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
/status/{id}: | |
get: | |
tags: | |
- "OrangeApiStatus" | |
operationId: "orangeApiStatusGet" | |
summary: "get orangeApiStatus" | |
parameters: | |
- name: "OrangeApiStatusId" | |
required: true | |
in: "path" | |
schema: | |
type: "string" | |
- name: "brand" | |
required: false | |
in: "query" | |
schema: | |
$ref: "#/components/schemas/Brand" | |
responses: | |
"200": | |
description: "Ok" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiStatus" | |
"400": | |
description: "Bad Request\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"404": | |
description: "Not Found\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"405": | |
description: "Method Not Allowed\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"422": | |
description: "Unprocessable entity\n\nBusiness error" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"500": | |
description: "Internal Server Error\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
"503": | |
description: "Service Unavailable\n\n" | |
content: | |
application/json;charset=utf-8: | |
schema: | |
$ref: "#/components/schemas/OrangeApiError" | |
servers: | |
- url: "/v1" | |
components: | |
schemas: | |
Brand: | |
type: "string" | |
enum: | |
- "Apple" | |
- "Samsung" | |
- "Huawei" | |
- "Xiaomi" | |
Capabilities: | |
description: "Technical capabilities" | |
required: | |
- "id" | |
- "category" | |
- "name" | |
- "value" | |
type: "object" | |
properties: | |
id: | |
type: "string" | |
category: | |
$ref: "#/components/schemas/CategoryType" | |
name: | |
type: "string" | |
value: | |
type: "string" | |
CategoryType: | |
type: "string" | |
enum: | |
- "Autonomy" | |
- "NetworkConnectivity" | |
- "CallsNMessaging" | |
- "OperatingSytem" | |
- "Screen" | |
- "Dimention" | |
Device: | |
description: "Device accessible to Orange boutique" | |
required: | |
- "id" | |
- "brand" | |
- "screen" | |
- "type" | |
- "description" | |
- "characteristics" | |
type: "object" | |
properties: | |
id: | |
type: "string" | |
brand: | |
$ref: "#/components/schemas/Brand" | |
screen: | |
$ref: "#/components/schemas/screen" | |
type: | |
$ref: "#/components/schemas/Type" | |
description: | |
type: "string" | |
characteristics: | |
type: "array" | |
items: | |
$ref: "#/components/schemas/Capabilities" | |
Type: | |
type: "string" | |
enum: | |
- "Smartphone" | |
- "Tablet" | |
- "Mobile" | |
- "IoT" | |
screen: | |
description: "Type of screen" | |
type: "string" | |
enum: | |
- "tactile" | |
OrangeApiComponent: | |
description: "A component your service requires (other web service, database,\ | |
\ etc) to be fully functional. See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)" | |
required: | |
- "status" | |
- "name" | |
- "version" | |
type: "object" | |
properties: | |
status: | |
description: "Component status ok | ko" | |
$ref: "#/components/schemas/OrangeApiStatusValue" | |
name: | |
description: "Component internal name." | |
type: "string" | |
version: | |
description: "major.minor.patch see [semver.org](https://semver.org/) or\ | |
\ G00R00C00" | |
type: "string" | |
OrangeApiError: | |
description: "See [Orange recommendation](https://recommendations.innov.intraorange/designing-orange-api/#error-format)" | |
required: | |
- "code" | |
- "message" | |
type: "object" | |
properties: | |
code: | |
description: "An integer coding the error type. This is given to caller\ | |
\ so he can translate them if required." | |
type: "integer" | |
format: "int32" | |
message: | |
description: "A short localized string that describes the error." | |
type: "string" | |
description: | |
description: "(optional) A long localized error description if needed. It\ | |
\ can contain precise information about which parameter is missing, or\ | |
\ what are the identifier acceptable values." | |
type: "string" | |
infoURL: | |
description: "(optional) A URL to online documentation that provides more\ | |
\ information about the error." | |
type: "string" | |
OrangeApiStatus: | |
description: "Reflect service or component health. See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)" | |
required: | |
- "status" | |
- "name" | |
- "version" | |
type: "object" | |
properties: | |
status: | |
description: "Service status ok | ko" | |
$ref: "#/components/schemas/OrangeApiStatusValue" | |
name: | |
description: "Your service internal name." | |
type: "string" | |
version: | |
description: "major.minor.patch see [semver.org](https://semver.org/) or\ | |
\ G00R00C00" | |
type: "string" | |
components: | |
description: "Each array entry represents a component your service requires\ | |
\ (other web service, database, etc) to be fully functional" | |
type: "array" | |
items: | |
$ref: "#/components/schemas/OrangeApiComponent" | |
OrangeApiStatusValue: | |
description: "status ok | ko. See [Orange Recommendation](https://recommendations.innov.intraorange/designing-orange-api/#status-path)" | |
type: "string" | |
enum: | |
- "ok" | |
- "ko" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment