Skip to content

Commit

Permalink
Add icon, license, and create reusable ref in openapi yaml for reques…
Browse files Browse the repository at this point in the history
…ts with empty body
  • Loading branch information
rahul1995 committed Oct 25, 2024
1 parent a20a2c4 commit bb659df
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 102 deletions.
2 changes: 1 addition & 1 deletion ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
license = ["Apache-2.0"]
authors = ["Ballerina"]
keywords = []
# icon = "icon.png" # TODO: update icon.png
icon = "icon.png"
repository = "https://github.com/ballerina-platform/module-ballerinax-dropbox"

[build-options]
Expand Down
16 changes: 16 additions & 0 deletions ballerina/client.bal
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
//
// WSO2 LLC. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import ballerina/http;

# The powerful, yet simple, Dropbox API allows you to manage and control content and team settings programmatically and extend Dropbox capabilities in new and powerful ways. This is a collection that includes requests to all endpoints in the Dropbox API.
Expand Down
Binary file added ballerina/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions ballerina/types.bal
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
//
// WSO2 LLC. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import ballerina/http;

# Represents the Headers record for the operation: post2FilesCopy_referenceGet
Expand Down
16 changes: 16 additions & 0 deletions ballerina/utils.bal
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
//
// WSO2 LLC. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import ballerina/url;

type SimpleBasicType string|boolean|int|float|decimal;
Expand Down
127 changes: 27 additions & 100 deletions docs/spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ servers:
- url: https://content.dropboxapi.com
- url: https://notify.dropboxapi.com
components:
requestBodies:
EmptyRequestBody:
content:
application/json:
schema:
type: object
properties: {}
securitySchemes:
bearerAuth:
type: http
Expand Down Expand Up @@ -340,11 +347,7 @@ paths:
Disables the access token used to authenticate the call.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -495,11 +498,7 @@ paths:
on your team or who you imported. New contacts will be added when you
share.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -1160,11 +1159,7 @@ paths:
Get the template identifiers for a team. To get the schema of each
template use `templates/get_for_team`.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
security:
- bearerAuth: []
responses:
Expand Down Expand Up @@ -1202,11 +1197,7 @@ paths:
template use `templates/get_for_user`. This endpoint can't be called on
a team member or admin's behalf.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -1459,11 +1450,7 @@ paths:
Returns the total number of file requests owned by this user. Includes
both open and closed file requests.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -1659,11 +1646,7 @@ paths:
Delete all closed file requests owned by this user.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -2996,11 +2979,7 @@ paths:
Download a file from a user's Dropbox.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -3084,11 +3063,7 @@ paths:
The input cannot be a single file. Any single file must be less than 4GB
in size.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -3156,11 +3131,7 @@ paths:
files that cannot be downloaded directly and whose
`ExportResult.file_metadata` has `ExportInfo.export_as` populated.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -3434,11 +3405,7 @@ paths:
Other formats will return an unsupported extension error.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -3718,11 +3685,7 @@ paths:
Get a thumbnail for a file.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -5315,11 +5278,7 @@ paths:
limit
page](https://www.dropbox.com/developers/reference/data-transport-limit).
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -5415,11 +5374,7 @@ paths:
limit
page](https://www.dropbox.com/developers/reference/data-transport-limit).
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -5477,11 +5432,7 @@ paths:
limit
page](https://www.dropbox.com/developers/reference/data-transport-limit).
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -5797,11 +5748,7 @@ paths:
limit
page](https://www.dropbox.com/developers/reference/data-transport-limit).
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -6457,11 +6404,7 @@ paths:
Download the shared link's file from a user's Dropbox.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Arg
in: header
Expand Down Expand Up @@ -12621,11 +12564,7 @@ paths:
Retrieves information about a team.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
security:
- bearerAuth: []
responses:
Expand Down Expand Up @@ -12676,11 +12615,7 @@ paths:
Returns the member profile of the admin who generated the team access
token used to make the call.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
responses:
'200':
description: OK
Expand Down Expand Up @@ -13193,11 +13128,7 @@ paths:
Get information about the current user's account.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down Expand Up @@ -13278,11 +13209,7 @@ paths:
Get the space usage information for the current user's account.
requestBody:
content:
application/json:
schema:
type: object
properties: {}
$ref: "#/components/requestBodies/EmptyRequestBody"
parameters:
- name: Dropbox-API-Path-Root
in: header
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/sanitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The OpenAPI specification is obtained from https://www.postman.com/dropbox-api/d
These changes are done in order to improve the overall usability, and as workarounds for some known language limitations.

[//]: # (TODO: Add sanitation details)
1. Add a content type and schema to each empty content in the request body.
1. Add a content-type and schema to each empty content in the request body.
2.
3.

Expand Down

0 comments on commit bb659df

Please sign in to comment.