Skip to content

Commit

Permalink
Revert "Merge branch 'main' into DEVDOCS-5831"
Browse files Browse the repository at this point in the history
This reverts commit 251cd21, reversing
changes made to f703c54.
  • Loading branch information
bc-tgomez committed Jun 4, 2024
1 parent 251cd21 commit 40d538e
Show file tree
Hide file tree
Showing 145 changed files with 7,418 additions and 8,556 deletions.
18 changes: 0 additions & 18 deletions .github/actions/retext-style-guide/Dockerfile

This file was deleted.

42 changes: 0 additions & 42 deletions .github/actions/retext-style-guide/action.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/actions/retext-style-guide/entrypoint.sh

This file was deleted.

21 changes: 8 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rebuild Production Dev Center
name: Deploy

on:
push:
Expand All @@ -9,16 +9,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger CircleCI Build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Trigger Vercel Deploy Hook
run: |
curl --location 'https://circleci.com/api/v2/project/gh/bigcommerce/developer-center/pipeline' \
--header 'Circle-Token: ${{ secrets.CIRCLECI_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"branch": "main",
"parameters": {
"build_environment": "production",
"github_triggering_actor": "${{ github.actor }}"
}
}'
curl -X POST ${{ secrets.VERCEL_DEPLOY_HOOK_URL }}?buildCache=false
12 changes: 4 additions & 8 deletions .github/workflows/retext-style-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ jobs:
name: runner / retext-style-guide
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/retext-style-guide
- uses: actions/checkout@v3
- name: quality-docs-github-check
uses: bigcommerce/dev-docs-style-guide-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
filter_mode: added
before_commit: ${{ github.event.before }}
after_commit: ${{ github.sha }}
131 changes: 90 additions & 41 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,93 @@
extends: spectral:oas
rules:
info-contact: off
oas3-unused-component: off
properties-type-object:
description: "type: object must have a properties sibling."
given: "$..[?(@ && @.type == 'object')]"
severity: error
# must not be resolved because $ref-defined objects shall have its type
# defined in the referenced schema, not the referencing field (and $ref
# must be the only property, anyway)
resolved: false
# type field must be defined and contain the value object
then:
- field: "properties"
function: "truthy"
items-type-array:
description: "type: array must have an items sibling."
given: "$..[?(@ && @.type == 'array')]"
severity: error
# must not be resolved because $ref-defined objects shall have its type
# defined in the referenced schema, not the referencing field (and $ref
# must be the only property, anyway)
resolved: false
# type field must be defined and contain the value object
then:
- field: "items"
function: "truthy"
type-object-properties:
description: "Objects with properties must have type: object."
given: "$..[?(@ && @.properties)]"
severity: error
# must not be resolved because $ref-defined objects shall have its type
# defined in the referenced schema, not the referencing field (and $ref
# must be the only property, anyway)
resolved: false
# type field must be defined and contain the value object
then:
- field: "type"
function: defined
- field: "type"
function: enumeration
functionOptions:
values:
- object
oas2-unused-definition: off
except:
'reference/tax_provider.yml':
- oas3-schema
'reference/carts.v3.yml':
- oas2-oneOf
- oas2-valid-schema-example
- operation-tag-defined
'reference/catalog.v3.yml':
- oas2-operation-security-defined
- oas3-schema
- oas2-schema
- oas2-valid-media-example
- oas2-valid-schema-example
'reference/channels.v3.yml':
- oas3-schema
- oas3-valid-media-example
'reference/current_customer.yml':
- operation-success-response
'reference/custom-template-associations.v3.yml':
- openapi-tags
- operation-tag-defined
'reference/customer_login.yml':
- operation-success-response
'reference/email_templates.v3.yml':
- oas3-schema
'reference/geography.v2.yml':
- oas2-valid-media-example
'reference/orders.v2.oas2.yml':
- oas3-valid-schema-example
- oas3-valid-media-example
- oas3-schema
'reference/orders.v3.yml':
- oas2-valid-schema-example
- oas2-valid-media-example
- oas2-anyOf
'reference/settings.v3.yml':
- oas3-valid-media-example
'reference/sites.v3.yml':
- oas2-valid-media-example
'reference/store_information.v2.yml':
- oas2-valid-media-example
- oas2-valid-schema-example
'reference/themes.v3.yml':
- oas3-schema
'reference/webhooks.v3.yml':
- oas3-valid-media-example
'carts.v3.yml':
- oas2-oneOf
- oas2-valid-schema-example
'catalog.v3.yml':
- oas2-operation-security-defined
- oas3-schema
- oas2-schema
- oas2-valid-media-example
- oas2-valid-schema-example
'channels.v3.yml':
- oas3-schema
- oas3-valid-media-example
'current_customer.yml':
- operation-success-response
'customer_login.yml':
- operation-success-response
'email_templates.v3.yml':
- oas3-schema
'geography.v2.yml':
- oas2-valid-media-example
'orders.v2.oas2.yml':
- oas3-valid-schema-example
- oas3-valid-media-example
- oas3-schema
'orders.v3.yml':
- oas2-valid-schema-example
- oas2-valid-media-example
- oas2-anyOf
'settings.v3.yml':
- oas3-valid-media-example
'sites.v3.yml':
- oas2-valid-media-example
'store_information.v2.yml':
- oas2-valid-media-example
- oas2-valid-schema-example
'themes.v3.yml':
- oas3-schema
'webhooks.v3.yml':
- oas3-valid-media-example
'pages.v3.yml':
- oas3-valid-media-example
- oas3-valid-schema-example
14 changes: 5 additions & 9 deletions archive/rest-catalog/custom-fields.v2.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
openapi: '3.0.3'
info:
title: Catalog - custom fields V2
description: |-
Custom fields V2
title: Catalog - Custom Fields V2
termsOfService: 'https://www.bigcommerce.com/terms'
contact:
name: BigCommerce
url: 'https://www.bigcommerce.com'
email: [email protected]
version: '1.0.1'
servers:
- url: 'https://api.bigcommerce.com/stores/{store_hash}/v2'
- url: 'https://{{store_url}}/api/v2'
variables:
store_hash:
default: store_hash
description: Permanent ID of the BigCommerce store.
store_url:
default: store_url
description: Permanent url of the BigCommerce store.
description: BigCommerce API Gateway
security:
- basicAuth: []
Expand All @@ -41,8 +39,6 @@ paths:
The maximum limit is 250. If a limit isn’t provided, up to 50 custom_fields are returned by default.
schema:
type: integer
default: 50
maximum: 250
responses:
'200':
$ref: '#/components/responses/customfields'
Expand Down
19 changes: 6 additions & 13 deletions docs/api-docs/apps/apps-quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,16 @@ npm install

You will need a publicly accessible URL to connect the draft app to BigCommerce. To add network access while in the development phase, you can use [ngrok](https://ngrok.com/docs), a free tool that lets you expose local servers like `localhost:3000{:http}` to the public internet over secure tunnels.

1. In a new terminal window, install [ngrok](https://www.npmjs.com/package/ngrok#usage) using Homebrew.
1. In a new terminal window, install [ngrok](https://www.npmjs.com/package/ngrok#usage).

```shell copy
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken <TOKEN>
npm install ngrok -g
```
<Callout type="info">
You can obtain your authtoken by going to https://dashboard.ngrok.com/get-started/your-authtoken.
</Callout>


2. Expose the web server to the internet.
2. Expose the web server on port 3000 to the internet.

```bash
cd ~/path/to/sample-app-nodejs # Make sure you're in your project directory.

ngrok http http://localhost:8080 # Start the app
```shell copy
ngrok http 3000
```

## Register the app
Expand All @@ -56,7 +49,7 @@ Next, create a draft app profile in the [Developer Portal](https://devtools.bigc
2. Click **Create an app**.
3. Give the app a name.
4. Click **Technical**.
5. Enter the **Auth Callback URL** as `https://{ngrok_url}/api/auth{:http}`. For example, `https://12345.ngrok.io/api/auth{:http}`. You can get the `ngrok_url` from the terminal that is running `ngrok http http://localhost:8080`.
5. Enter the **Auth Callback URL** as `https://{ngrok_url}/api/auth{:http}`. For example, `https://12345.ngrok.io/api/auth{:http}`. You can get the `ngrok_url` from the terminal that is running `ngrok http 3000{:shell}`.
6. Enter the **Load Callback URL** as `https://{ngrok_url}/api/load{:http}`.
7. Enter the **Uninstall Callback URL** as `https://{ngrok_url}/api/uninstall{:http}`.
8. If your app supports multiple users, locate the **App Features** section. Select **Multiple Users**, then enter the **Remove User Callback URL** as `https://{ngrok_url}/api/remove_user{:http}`.
Expand Down
14 changes: 7 additions & 7 deletions docs/api-docs/apps/guide/apps-03-developing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ You can use [ngrok](https://ngrok.com/) to test apps locally. It's easy to insta


```shell copy
npm install express-generator -g # install express generate
npm install express-generator -g # install express generate

express myapp # generate new express app
express myapp # generate new express app

cd myapp # move into app dir
cd myapp # move into app dir

brew install ngrok/ngrok/ngrok # install ngrok using homebrew
npm install ngrok # install ngrok

ngrok config add-authtoken <TOKEN> # Obtain your authtoken by going to https://dashboard.ngrok.com/get-started/your-authtoken
npm install # install dependencies

npm install # install dependencies
npm start # start app

ngrok http http://localhost:8080 # start app
ngrok http 3000 # start ngrok
```

For step-by-step instructions, see [How to Test App Authentication Locally with ngrok](https://medium.com/bigcommerce-developer-blog/how-to-test-app-authentication-locally-with-ngrok-149150bfe4cf) on our [developer blog](https://medium.com/bigcommerce-developer-blog).
Expand Down
Loading

0 comments on commit 40d538e

Please sign in to comment.