1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-10 16:00:05 +00:00

Merge pull request #284 from sasjs/apidocs

chore(docs): updating API docs
This commit is contained in:
Allan Bowe
2022-09-20 12:25:12 +01:00
committed by GitHub
4 changed files with 14 additions and 20 deletions

View File

@@ -663,7 +663,7 @@ paths:
description: 'Execute SAS code.' description: 'Execute SAS code.'
summary: 'Run SAS Code and returns log' summary: 'Run SAS Code and returns log'
tags: tags:
- CODE - Code
security: security:
- -
bearerAuth: [] bearerAuth: []
@@ -1658,8 +1658,8 @@ paths:
anyOf: anyOf:
- {type: string} - {type: string}
- {type: string, format: byte} - {type: string, format: byte}
description: "Trigger a SAS or JS program using the _program URL parameter.\n\nAccepts URL parameters and file uploads. For more details, see docs:\n\nhttps://server.sasjs.io/storedprograms" description: "Trigger a Stored Program using the _program URL parameter.\n\nAccepts URL parameters and file uploads. For more details, see docs:\n\nhttps://server.sasjs.io/storedprograms"
summary: 'Execute a Stored Program, returns raw _webout content.' summary: 'Execute a Stored Program, returns _webout and (optionally) log.'
tags: tags:
- STP - STP
security: security:
@@ -1667,7 +1667,7 @@ paths:
bearerAuth: [] bearerAuth: []
parameters: parameters:
- -
description: 'Location of SAS or JS code' description: 'Location of code in SASjs Drive'
in: query in: query
name: _program name: _program
required: true required: true
@@ -1685,7 +1685,7 @@ paths:
anyOf: anyOf:
- {type: string} - {type: string}
- {type: string, format: byte} - {type: string, format: byte}
description: "Trigger a SAS or JS program using the _program URL parameter.\n\nAccepts URL parameters and file uploads. For more details, see docs:\n\nhttps://server.sasjs.io/storedprograms\n\nThe response will be a JSON object with the following root attributes:\nlog, webout, headers.\n\nThe webout attribute will be nested JSON ONLY if the response-header\ncontains a content-type of application/json AND it is valid JSON.\nOtherwise it will be a stringified version of the webout content." description: "Trigger a Stored Program using the _program URL parameter.\n\nAccepts URL parameters and file uploads. For more details, see docs:\n\nhttps://server.sasjs.io/storedprograms"
summary: 'Execute a Stored Program, return a JSON object' summary: 'Execute a Stored Program, return a JSON object'
tags: tags:
- STP - STP
@@ -1694,7 +1694,7 @@ paths:
bearerAuth: [] bearerAuth: []
parameters: parameters:
- -
description: 'Location of SAS or JS code' description: 'Location of code in SASjs Drive'
in: query in: query
name: _program name: _program
required: false required: false
@@ -1798,7 +1798,7 @@ tags:
name: Client name: Client
description: 'Operations about clients' description: 'Operations about clients'
- -
name: CODE name: Code
description: 'Execution of code (various runtimes are supported)' description: 'Execution of code (various runtimes are supported)'
- -
name: Drive name: Drive

View File

@@ -24,7 +24,7 @@ interface ExecuteCodePayload {
@Security('bearerAuth') @Security('bearerAuth')
@Route('SASjsApi/code') @Route('SASjsApi/code')
@Tags('CODE') @Tags('Code')
export class CodeController { export class CodeController {
/** /**
* Execute SAS code. * Execute SAS code.

View File

@@ -23,14 +23,14 @@ interface ExecutePostRequestPayload {
@Tags('STP') @Tags('STP')
export class STPController { export class STPController {
/** /**
* Trigger a SAS or JS program using the _program URL parameter. * Trigger a Stored Program using the _program URL parameter.
* *
* Accepts URL parameters and file uploads. For more details, see docs: * Accepts URL parameters and file uploads. For more details, see docs:
* *
* https://server.sasjs.io/storedprograms * https://server.sasjs.io/storedprograms
* *
* @summary Execute a Stored Program, returns raw _webout content. * @summary Execute a Stored Program, returns _webout and (optionally) log.
* @param _program Location of SAS or JS code * @param _program Location of code in SASjs Drive
* @example _program "/Projects/myApp/some/program" * @example _program "/Projects/myApp/some/program"
*/ */
@Get('/execute') @Get('/execute')
@@ -43,21 +43,15 @@ export class STPController {
} }
/** /**
* Trigger a SAS or JS program using the _program URL parameter. * Trigger a Stored Program using the _program URL parameter.
* *
* Accepts URL parameters and file uploads. For more details, see docs: * Accepts URL parameters and file uploads. For more details, see docs:
* *
* https://server.sasjs.io/storedprograms * https://server.sasjs.io/storedprograms
* *
* The response will be a JSON object with the following root attributes:
* log, webout, headers.
*
* The webout attribute will be nested JSON ONLY if the response-header
* contains a content-type of application/json AND it is valid JSON.
* Otherwise it will be a stringified version of the webout content.
* *
* @summary Execute a Stored Program, return a JSON object * @summary Execute a Stored Program, return a JSON object
* @param _program Location of SAS or JS code * @param _program Location of code in SASjs Drive
* @example _program "/Projects/myApp/some/program" * @example _program "/Projects/myApp/some/program"
*/ */
@Post('/execute') @Post('/execute')

View File

@@ -20,7 +20,7 @@
"description": "Operations about clients" "description": "Operations about clients"
}, },
{ {
"name": "CODE", "name": "Code",
"description": "Execution of code (various runtimes are supported)" "description": "Execution of code (various runtimes are supported)"
}, },
{ {