nishant4121988
4 years agoOccasional Contributor
Structural error at paths
basePath : "/services/apexrest/sg"
schemes:
- "https"
- "http"
paths:
/0.1/customer:
get:
description: Should give an overview / a list of all customers with state active. List should contain ID and Name of customer.
responses:
200:
description: Successfull
schema:
type: array
items:
properties:
id:
type: integer
example: 007
name:
type: string
example: Nishant
count:
type: integer
example: 04121988
security:
- subscription_auth:
- "write:pets"
- "read:pets"
/0.1/customer/{account_id}:
get:
summary: Get a user by ID
parameters:
- in: path
name: account_id
type: integer
required: true
description: Numeric ID of the Account to get Account Details
responses:
200:
description: Account Details
schema:
type: object
properties:
name:
type: string
example: Nishant
site:
type: string
example: berlin
billingAddress:
type: string
example: berlin
description:
type: string
example: Account's details
phone:
type: integer
example: 02736464648494
shippingAddress:
type: string
example: berlin
website:
type : string
example : www.XXXX.com
childAccounts:
type: object
items:
properties:
Id :
type : string
name :
type : string
createdBy:
type: object
items:
properties:
Id :
type : string
name :
type : string
lastModifiedBy:
type: object
items:
properties:
Id :
type : string
name :
type : string
parentAccount:
type: object
items:
properties:
Id :
type : string
name :
type : string
security:
- subscription_auth:
- "write:pets"
- "read:pets"
/0.1/customer/{account_id}/subscriptions:
get:
summary: Get a user's Subscription by ID
parameters:
- in: path
name: account_id
type: integer
required: true
description: Numeric ID of the Account to get
responses:
200:
description: Account Details
schema:
type: object
properties:
activeSubscriptions:
type: object
items:
properties:
Id :
type : string
name :
type : string
countActiveSubscriptions:
type: integer
inActiveSubscriptions:
type: object
items:
properties:
Id :
type : string
name :
type : string
countInActiveSubscriptions:
type: integer
canceledSubscriptions:
type: object
items:
properties:
Id :
type : string
name :
type : string
countCanceledSubscriptions:
type: integer
example: 20000
security:
- subscription_auth:
- "write:pets"
- "read:pets"
/0.1/subscription:
get:
description: Should give an overview / a list of all subscriptions with state active.
responses:
200:
description: Successfull
schema:
type: array
items:
properties:
activeSubscriptions:
type: object
items:
properties:
Id :
type : string
name :
type : string
countActiveSubscriptions:
type: integer
example: 04121988
security:
- subscription_auth:
- "write:pets"
- "read:pets"
/0.1/subscription/{SUBSCRIPTION_ID}/:
get:
summary: Get a user's Subscription by ID
parameters:
- in: path
name: SUBSCRIPTION_ID
type: integer
required: true
description: Numeric ID of the Subscription to get
responses:
200:
description: Subscription Details
schema:
type: object
properties:
id:
type: string
example: 564664564Nishant
name:
type: string
example: Nishant
account:
type: object
items:
properties:
Id :
type : string
name :
type : string
createdBy:
type: object
items:
properties:
Id :
type : string
name :
type : string
currency:
type: integer
example: 02736464648494
initialMRR:
type: integer
lastInvoiceRun:
type : string
owner:
type: object
items:
properties:
Id :
type : string
name :
type : string
nextInvoice:
type: string
lastModifiedBy:
type: object
items:
properties:
Id :
type : string
name :
type : string
quoteNumber:
type: string
renewalDate:
type: string
startDate:
type: string
status:
type: string
security:
- subscription_auth:
- "write:pets"
- "read:pets"
/0.2/jobs/{JOB_ID}/:
get:
summary: Get a user's Service by Job_ID
parameters:
- in: path
name: JOB_ID
type: integer
required: true
description: Numeric ID of the Job to get details from the Service object
responses:
200:
description: Job Details
schema:
type: object
properties:
name:
type: string
example: Nishant
Price:
type: integer
example: 02736464648494
Channel:
type : string
Date:
type: string
security:
- subscription_auth:
- "write:pets"
- "read:pets"
securitySchemes:
oAuth2ClientCredentials:
type: oauth2
description: /services/oauth2/success
flows:
clientCredentials:
tokenUrl: /oauth2/token
scopes:
write: modify your account
read: read your Account
securityDefinitions:
subscription_auth:
type: "oauth2"
authorizationUrl: "http://--uat.lightning.force.com/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify subscription"
read:pets: "read your record"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
OK I see the error now. It's caused by an extra "securitySchemes" section in "paths". You need to remove it.