Skip to content
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

refactor: merging all docs into a single repository #37

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
efe1de4
chore: adding base logic for the docs components
jarrodek Sep 27, 2021
f5ed623
chore: adding todo list
jarrodek Sep 27, 2021
2ff1e43
chore: separating Sync and Async endpoints
jarrodek Sep 28, 2021
b9e9ae7
chore: finalizing the documentation document
jarrodek Sep 28, 2021
ba3b669
feat: adding API Annotation element
jarrodek Sep 28, 2021
23fe775
chore: moving APIs to another folder
jarrodek Sep 28, 2021
a62acef
chore: updating schema documentation
jarrodek Sep 29, 2021
b1db250
chore: adding support for xone union type
jarrodek Sep 29, 2021
c20a200
chore: adding support for TupleShape shape
jarrodek Sep 29, 2021
91b9c2d
chore: adding schema tests
jarrodek Sep 29, 2021
c5450dd
fix: fixing schema title styles
jarrodek Sep 29, 2021
9972301
chore: syncying the response view
jarrodek Sep 30, 2021
19dde29
fix: fixing array queryString processing
jarrodek Sep 30, 2021
2955511
chore: moving tests from other components
jarrodek Oct 1, 2021
2b29a7f
chore: adding tests from api-resource-example-document
jarrodek Oct 1, 2021
b6060de
chore: moving api-summary here
jarrodek Oct 2, 2021
7515025
chore: fixing operation rendering issues
jarrodek Oct 3, 2021
06fd79b
chore: syncing operation templae
jarrodek Oct 4, 2021
de3e8f6
test: adding operation's SE and APIC test cases
jarrodek Oct 4, 2021
a0eef4a
chore: finishing the operation element and tests
jarrodek Oct 4, 2021
2907bd2
chore: finalizing the api request documentation
jarrodek Oct 5, 2021
873734d
test: adding basicv resource tests
jarrodek Oct 5, 2021
e45e220
test: writing tests for resource document
jarrodek Oct 5, 2021
8f86ed5
feat: adding api-documentation and partial models
jarrodek Oct 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '21 7 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
9 changes: 2 additions & 7 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ on:
- main
jobs:
test_linux:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
# os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ coverage
demo/vendor.js

# AMF models
/demo/*.json
!demo/apis.json
demo/models/

.idea/
.idea/
18 changes: 13 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"cSpell.words": [
"Applian",
"Nexmo",
"Tryit",
"apiserverchanged",
"Applian",
"contentinfo",
"dompurify",
"fasttext",
"mimechange",
"monostate",
"Nexmo",
"notryit",
"serverscountchanged"
"serverscountchanged",
"signedup",
"stevetest",
"Tryit",
"Unionable",
"xone"
]
}
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

## 7.0.0

### ApiResourceDocumentationElement (former api-endpoint-documentation)

The `api-resource-document` element has the following properties changes compared to deprecated `api-endpoint-documentation`

- `noTryIt` is renamed to `tryItButton`. When `tryItButton` is set then the try it button in operations is rendered.
- `inlineMethods` is renamed to `tryItPanel`. Has the same function.
- `noUrlEditor` is now renamed to `urlEditor`. When `urlEditor` is set then the HTTP request editor renders the URL editor input field.

### ApiOperationDocumentElement (former api-operation-documentation)

- `tryIt` is renamed to `tryItButton`
- `tryItButton` is always set to `false` when `tryItPanel` is set on the resource document element.
16 changes: 16 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# TODO

- ~~Add "try it" button~~
- ~~Sync the Operation template~~
- ~~Sync the Endpoint template~~
- ~~Sync the Schema template~~
- ~~Sync the Response template~~
- ~~Sync the Payload template~~
- ~~Render the request editor side-by-side~~
- ~~Fix the `(unknown path)` in the operation~~
- ~~Rendering of fragments and the partial model~~
- ~~main `api-documentation` element~~
- ~~replace body content type selector with radio buttons like in the request editor~~
- ~~move the `api-summary` element~~
- Tests
7 changes: 7 additions & 0 deletions api-annotation-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiAnnotationDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-annotation-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-annotation-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiAnnotationDocumentElement.js';

window.customElements.define('api-annotation-document', Element);
7 changes: 7 additions & 0 deletions api-channel-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiChannelDocumentationElement';

declare global {
interface HTMLElementTagNameMap {
"api-channel-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-channel-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiChannelDocumentationElement.js';

window.customElements.define('api-channel-document', Element);
7 changes: 7 additions & 0 deletions api-documentation-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiDocumentationDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-documentation-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-documentation-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiDocumentationDocumentElement.js';

window.customElements.define('api-documentation-document', Element);
4 changes: 2 additions & 2 deletions api-documentation.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApiDocumentationElement } from './src/ApiDocumentationElement';
import Element from './src/elements/ApiDocumentationElement';

declare global {
interface HTMLElementTagNameMap {
"api-documentation": ApiDocumentationElement;
"api-documentation": Element;
}
}
4 changes: 2 additions & 2 deletions api-documentation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ApiDocumentationElement } from './src/ApiDocumentationElement.js';
import Element from './src/elements/ApiDocumentationElement.js';

window.customElements.define('api-documentation', ApiDocumentationElement);
window.customElements.define('api-documentation', Element);
7 changes: 7 additions & 0 deletions api-operation-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiOperationDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-operation-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-operation-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiOperationDocumentElement.js';

window.customElements.define('api-operation-document', Element);
7 changes: 7 additions & 0 deletions api-parameter-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiParameterDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-parameter-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-parameter-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiParameterDocumentElement.js';

window.customElements.define('api-parameter-document', Element);
7 changes: 7 additions & 0 deletions api-parametrized-security-scheme.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiParametrizedSecuritySchemeElement';

declare global {
interface HTMLElementTagNameMap {
"api-parametrized-security-scheme": Element;
}
}
3 changes: 3 additions & 0 deletions api-parametrized-security-scheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiParametrizedSecuritySchemeElement.js';

window.customElements.define('api-parametrized-security-scheme', Element);
7 changes: 7 additions & 0 deletions api-payload-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiPayloadDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-payload-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-payload-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiPayloadDocumentElement.js';

window.customElements.define('api-payload-document', Element);
7 changes: 7 additions & 0 deletions api-request-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiRequestDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-request-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-request-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiRequestDocumentElement.js';

window.customElements.define('api-request-document', Element);
7 changes: 7 additions & 0 deletions api-resource-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiResourceDocumentationElement';

declare global {
interface HTMLElementTagNameMap {
"api-resource-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-resource-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiResourceDocumentationElement.js';

window.customElements.define('api-resource-document', Element);
7 changes: 7 additions & 0 deletions api-response-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiResponseDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-response-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-response-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiResponseDocumentElement.js';

window.customElements.define('api-response-document', Element);
7 changes: 7 additions & 0 deletions api-schema-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiSchemaDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-schema-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-schema-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiSchemaDocumentElement.js';

window.customElements.define('api-schema-document', Element);
7 changes: 7 additions & 0 deletions api-security-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiSecurityDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-security-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-security-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiSecurityDocumentElement.js';

window.customElements.define('api-security-document', Element);
7 changes: 7 additions & 0 deletions api-security-requirement-document.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiSecurityRequirementDocumentElement';

declare global {
interface HTMLElementTagNameMap {
"api-security-requirement-document": Element;
}
}
3 changes: 3 additions & 0 deletions api-security-requirement-document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiSecurityRequirementDocumentElement.js';

window.customElements.define('api-security-requirement-document', Element);
7 changes: 7 additions & 0 deletions api-summary.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Element from './src/elements/ApiSummaryElement';

declare global {
interface HTMLElementTagNameMap {
"api-summary": Element;
}
}
3 changes: 3 additions & 0 deletions api-summary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Element from './src/elements/ApiSummaryElement.js';

window.customElements.define('api-summary', Element);
16 changes: 16 additions & 0 deletions demo/api-annotation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>API Annotation</title>
<link rel="stylesheet" href="./demo.css" />
</head>

<body class="demo styled">
<div id="demo"></div>
<script type="module" src="api-annotation.js"></script>
</body>

</html>
Loading