#!/usr/bin/env bash set -u SCRIPT_DIR="$(cd "$(dirname "${0}")" || exit 1; pwd)" || exit 1 TMP_DIR="${SCRIPT_DIR}/.sfr/tmp/generate-schema/" CLONE_DIR="${TMP_DIR}/repos/java-slack-sdk/" DEST_DIR="${SCRIPT_DIR}/crates/types/src/generated/" # functions # -- Prints error message and exit. function error_exit() { echo "${1:-unknown error}" >&2 exit 1 } # -- Clones the repository that has JSON data. function clone_repos() { if ! [ -d "${CLONE_DIR}" ]; then if ! git clone https://github.com/slackapi/java-slack-sdk.git "${CLONE_DIR}"; then return 1 fi fi return 0 } # -- Checks to install generator. function check_generator_installed() { npm run -- generate-schema-command --help > /dev/null } # -- Renames struct 'Option' to 'Option_'. function rename_option() { sed 's#\(Option\)\([> ]\)#\1_\2#g' } # -- Dirty hack: replace type mismatch function replace_type_mismatch() { set -u ROOT_CLASS_NAME="${1}" if [ "${ROOT_CLASS_NAME}" = 'ChatPostMessageResponse' ]; then # Dirty hack: style: String -> serde_json::Value, `***_type`: ***Type -> String sed '/\/s#\(pub style: Option<\).*\(>,\)$#\1serde_json::Value\2#' \ | sed '/\/s#\(pub [a-z]*_type: Option<\).*Type\(>,\)$#\1String\2#' elif [ "${ROOT_CLASS_NAME}" = 'FilesInfoResponse' ]; then # thumb_360_w: String -> i64 # thumb_360_h: String -> i64 # thumb_80_h: String -> i64 # ... # thumb_pdf_w: String -> i64 # thumb_pdf_h: String -> i64 # thumb_video_w: String -> i64 # thumb_video_h: String -> i64 # original_w: String -> i64 # original_h: String -> i64 sed '/\/s#\(pub \(thumb_[0-9]*__*[wh]\|thumb_pdf_[wh]\|thumb_video_[wh]\|original_[wh]\): Option<\).*\(>,\)$#\1i64\3#' else # not replace cat fi } # -- The wrapper function that generate schema. function generate() { set -u SOURCE_FILE="${1}" OUTPUT_FILE="${2}" ROOT_CLASS_NAME="${3}" TEMPORARY="${TMP_DIR}/tmp.rs" mkdir -p "$(dirname "${TEMPORARY}")" || { echo "failed to create directory for '${TEMPORARY}'" >&2 return 1 } npm run --silent -- generate-schema-command \ --src "${SOURCE_FILE}" \ --out "${TEMPORARY}" \ --lang rust \ --top-level "${ROOT_CLASS_NAME}" \ --quiet \ --density normal \ --visibility public \ --derive-debug \ --derive-clone \ --skip-serializing-none \ --alphabetize-properties \ --all-properties-optional \ || { echo "failed to generate schema: '${ROOT_CLASS_NAME}'" >&2 return 1 } { echo '//! !!! DO NOT EDIT THIS FILE !!!' echo '//!' echo '//! This file is auto-generated by '\''./generate-schema.sh'\'' in the repository. ' echo '//! Please refer to the script code to learn how to update the source data.' echo '' echo '#![allow(clippy::enum_variant_names)]' echo '#![allow(clippy::missing_docs_in_private_items)]' echo '#![allow(missing_docs)]' echo '#![allow(non_snake_case)]' echo '' rename_option < "${TEMPORARY}" \ | replace_type_mismatch "${ROOT_CLASS_NAME}" } \ > "${OUTPUT_FILE}" rm -f "${TEMPORARY}" return 0 } # main clone_repos \ || error_exit "failed to 'clone_repos'" check_generator_installed \ || error_exit "The schema generator is maybe not installed. Please run 'npm install'." # generate "${CLONE_DIR}/json-logs/samples/api/admin.analytics.getFile.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.activities.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.approve.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.approved.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.clearResolution.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.config.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.config.set.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.requests.cancel.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.requests.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.restrict.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.restricted.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.apps.uninstall.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.auth.policy.assignEntities.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.auth.policy.getEntities.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.auth.policy.removeEntities.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.barriers.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.barriers.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.barriers.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.barriers.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.archive.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.bulkArchive.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.bulkDelete.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.bulkMove.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.convertToPrivate.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.convertToPublic.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.disconnectShared.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.ekm.listOriginalConnectedChannelInfo.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.getConversationPrefs.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.getCustomRetention.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.getTeams.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.invite.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.removeCustomRetention.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.rename.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.restrictAccess.addGroup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.restrictAccess.listGroups.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.restrictAccess.removeGroup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.search.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.setConversationPrefs.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.setCustomRetention.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.setTeams.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.unarchive.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.whitelist.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.whitelist.listGroupsLinkedToChannel.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.conversations.whitelist.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.emoji.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.emoji.addAlias.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.emoji.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.emoji.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.emoji.rename.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.functions.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.functions.permissions.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.functions.permissions.set.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.inviteRequests.approve.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.inviteRequests.approved.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.inviteRequests.denied.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.inviteRequests.deny.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.inviteRequests.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.roles.addAssignments.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.roles.listAssignments.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.roles.removeAssignments.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.admins.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.owners.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.setDefaultChannels.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.setDescription.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.setDiscoverability.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.setIcon.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.teams.settings.setName.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.usergroups.addChannels.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.usergroups.addTeams.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.usergroups.listChannels.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.usergroups.removeChannels.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.assign.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.invite.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.clearSettings.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.getSettings.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.invalidate.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.reset.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.resetBulk.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.session.setSettings.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.setAdmin.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.setExpiration.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.setOwner.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.setRegular.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.users.unsupportedVersions.export.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.workflows.collaborators.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.workflows.collaborators.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.workflows.permissions.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.workflows.search.json" # generate "${CLONE_DIR}/json-logs/samples/api/admin.workflows.unpublish.json" # generate "${CLONE_DIR}/json-logs/samples/api/api.test.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.connections.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.event.authorizations.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.manifest.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.manifest.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.manifest.export.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.manifest.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.manifest.validate.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.request.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.resources.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.scopes.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.users.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.permissions.users.request.json" # generate "${CLONE_DIR}/json-logs/samples/api/apps.uninstall.json" # generate "${CLONE_DIR}/json-logs/samples/api/auth.revoke.json" # generate "${CLONE_DIR}/json-logs/samples/api/auth.teams.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/auth.test.json" # generate "${CLONE_DIR}/json-logs/samples/api/bookmarks.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/bookmarks.edit.json" # generate "${CLONE_DIR}/json-logs/samples/api/bookmarks.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/bookmarks.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/bots.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.end.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.participants.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.participants.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/calls.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.access.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.access.set.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.edit.json" # generate "${CLONE_DIR}/json-logs/samples/api/canvases.sections.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.archive.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.history.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.invite.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.join.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.kick.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.leave.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.mark.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.rename.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.replies.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.setPurpose.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.setTopic.json" # generate "${CLONE_DIR}/json-logs/samples/api/channels.unarchive.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.deleteScheduledMessage.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.getPermalink.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.meMessage.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.postEphemeral.json" generate "${CLONE_DIR}/json-logs/samples/api/chat.postMessage.json" "${DEST_DIR}/chat_post_message.rs" ChatPostMessageResponse \ || error_exit "failed to generate 'ChatPostMessageResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/chat.scheduleMessage.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.scheduledMessages.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.unfurl.json" # generate "${CLONE_DIR}/json-logs/samples/api/chat.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.acceptSharedInvite.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.approveSharedInvite.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.archive.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.canvases.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.close.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.declineSharedInvite.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.externalInvitePermissions.set.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.history.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.invite.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.inviteShared.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.join.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.kick.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.leave.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.listConnectInvites.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.mark.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.members.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.rename.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.replies.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.setPurpose.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.setTopic.json" # generate "${CLONE_DIR}/json-logs/samples/api/conversations.unarchive.json" # generate "${CLONE_DIR}/json-logs/samples/api/dialog.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/dnd.endDnd.json" # generate "${CLONE_DIR}/json-logs/samples/api/dnd.endSnooze.json" # generate "${CLONE_DIR}/json-logs/samples/api/dnd.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/dnd.setSnooze.json" # generate "${CLONE_DIR}/json-logs/samples/api/dnd.teamInfo.json" # generate "${CLONE_DIR}/json-logs/samples/api/emoji.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.comments.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.comments.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.comments.edit.json" generate "${CLONE_DIR}/json-logs/samples/api/files.completeUploadExternal.json" "${DEST_DIR}/files_complete_upload_external.rs" FilesCompleteUploadExternalResponse \ || error_exit "failed to generate 'FilesCompleteUploadExternalResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/files.delete.json" generate "${CLONE_DIR}/json-logs/samples/api/files.getUploadURLExternal.json" "${DEST_DIR}/files_get_upload_url_external.rs" FilesGetUploadUrlExternalResponse \ || error_exit "failed to generate 'FilesGetUploadUrlExternalResponse'" generate "${CLONE_DIR}/json-logs/samples/api/files.info.json" "${DEST_DIR}/files_info.rs" FilesInfoResponse \ || error_exit "failed to generate 'FilesInfoResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/files.list.json" generate "${CLONE_DIR}/json-logs/samples/api/files.remote.add.json" "${DEST_DIR}/files_remote_add.rs" FilesRemoteAddResponse \ || error_exit "failed to generate 'FilesRemoteAddResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/files.remote.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.remote.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.remote.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.remote.share.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.remote.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.revokePublicURL.json" # generate "${CLONE_DIR}/json-logs/samples/api/files.sharedPublicURL.json" generate "${CLONE_DIR}/json-logs/samples/api/files.upload.json" "${DEST_DIR}/files_upload.rs" FilesUploadResponse \ || error_exit "failed to generate 'FilesUploadResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/functions.completeError.json" # generate "${CLONE_DIR}/json-logs/samples/api/functions.completeSuccess.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.archive.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.close.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.createChild.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.history.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.invite.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.kick.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.leave.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.mark.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.rename.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.replies.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.setPurpose.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.setTopic.json" # generate "${CLONE_DIR}/json-logs/samples/api/groups.unarchive.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.close.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.history.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.mark.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/im.replies.json" # generate "${CLONE_DIR}/json-logs/samples/api/migration.exchange.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.close.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.history.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.mark.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/mpim.replies.json" # generate "${CLONE_DIR}/json-logs/samples/api/oauth.access.json" # generate "${CLONE_DIR}/json-logs/samples/api/oauth.token.json" generate "${CLONE_DIR}/json-logs/samples/api/oauth.v2.access.json" "${DEST_DIR}/oauth_v2_access.rs" OauthV2AccessResponse \ || error_exit "failed to generate 'OauthV2AccessResponse'" # generate "${CLONE_DIR}/json-logs/samples/api/oauth.v2.exchange.json" # generate "${CLONE_DIR}/json-logs/samples/api/openid.connect.token.json" # generate "${CLONE_DIR}/json-logs/samples/api/openid.connect.userInfo.json" # generate "${CLONE_DIR}/json-logs/samples/api/pins.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/pins.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/pins.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/reactions.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/reactions.get.json" # generate "${CLONE_DIR}/json-logs/samples/api/reactions.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/reactions.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/reminders.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/reminders.complete.json" # generate "${CLONE_DIR}/json-logs/samples/api/reminders.delete.json" # generate "${CLONE_DIR}/json-logs/samples/api/reminders.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/reminders.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/rtm.connect.json" # generate "${CLONE_DIR}/json-logs/samples/api/rtm.start.json" # generate "${CLONE_DIR}/json-logs/samples/api/search.all.json" # generate "${CLONE_DIR}/json-logs/samples/api/search.files.json" # generate "${CLONE_DIR}/json-logs/samples/api/search.messages.json" # generate "${CLONE_DIR}/json-logs/samples/api/stars.add.json" # generate "${CLONE_DIR}/json-logs/samples/api/stars.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/stars.remove.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.accessLogs.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.billableInfo.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.billing.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.externalTeams.disconnect.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.externalTeams.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.integrationLogs.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.preferences.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/team.profile.get.json" # generate "${CLONE_DIR}/json-logs/samples/api/tooling.tokens.rotate.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.create.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.disable.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.enable.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.users.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/usergroups.users.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.conversations.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.deletePhoto.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.discoverableContacts.lookup.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.getPresence.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.identity.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.info.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.list.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.lookupByEmail.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.profile.get.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.profile.set.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.setActive.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.setPhoto.json" # generate "${CLONE_DIR}/json-logs/samples/api/users.setPresence.json" # generate "${CLONE_DIR}/json-logs/samples/api/views.open.json" # generate "${CLONE_DIR}/json-logs/samples/api/views.publish.json" # generate "${CLONE_DIR}/json-logs/samples/api/views.push.json" # generate "${CLONE_DIR}/json-logs/samples/api/views.update.json" # generate "${CLONE_DIR}/json-logs/samples/api/workflows.stepCompleted.json" # generate "${CLONE_DIR}/json-logs/samples/api/workflows.stepFailed.json" # generate "${CLONE_DIR}/json-logs/samples/api/workflows.updateStep.json"