Skip to content

Openapi validation #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends: ["spectral:oas"]
rules:
oas3-unused-component: off
operation-tags: off
6 changes: 3 additions & 3 deletions api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2737,15 +2737,15 @@
]
}
},
"/players/csv_export?app_id={app_id}": {
"/players/csv_export": {
"post": {
"operationId": "export_players",
"summary": "CSV export",
"description": "Generate a compressed CSV export of all of your current user data\nThis method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint.\nThe file will be compressed using GZip.\nThe file may take several minutes to generate depending on the number of users in your app.\nThe URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable.\n🚧\n403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned.\n🚧\nRequires Authentication Key\nRequires your OneSignal App's REST API Key, available in Keys & IDs.\n🚧\nConcurrent Exports\nOnly one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app.\nCSV File Format:\n- Default Columns:\n | Field | Details |\n | --- | --- |\n | id | OneSignal Player Id |\n | identifier | Push Token |\n | session_count | Number of times they visited the app or site\n | language | Device language code |\n | timezone | Number of seconds away from UTC. Example: -28800 |\n | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. |\n | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 |\n | device_type | Device Operating System Type |\n | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` |\n | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. |\n | tags | Current OneSignal Data Tags on the device. |\n | last_active | Date and time the user last opened the mobile app or visited the site. |\n | playtime | Total amount of time in seconds the user had the mobile app open. |\n | amount_spent | \tMobile only - amount spent in USD on In-App Purchases. | \n | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. |\n | invalid_identifier | t = unsubscribed, f = subscibed |\n | badge_count | Current number of badges on the device |\n- Extra Columns:\n | Field | Details |\n | --- | --- |\n | external_user_id | Your User Id set on the device |\n | notification_types | Notification types |\n | location | Location points (Latitude and Longitude) set on the device. |\n | country | Country code |\n | rooted | Android device rooted or not |\n | ip | IP Address of the device if being tracked. See Handling Personal Data. |\n | web_auth | Web Only authorization key. |\n | web_p256 | Web Only p256 key. |\n",
"parameters": [
{
"name": "app_id",
"in": "path",
"in": "query",
"required": true,
"description": "The app ID that you want to export devices from",
"schema": {
Expand Down Expand Up @@ -2810,4 +2810,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ elif [[ "$(uname)" = "Linux" ]]; then
fi

npm install -g jsonlint
npm install -g ibm-openapi-validator
1 change: 1 addition & 0 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
set -exuo pipefail

jsonlint -q api.json
lint-openapi api.json