Add initial Copenhagen Truck Wash API documentation, including API overview, authentication, error handling, introduction, and Writerside configuration.
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
# Copenhagen Truck Wash API — Writerside Style Guide
|
||||
# This file defines the style rules for our documentation.
|
||||
# For more details, see https://vale.sh/docs/topics/styles/#extension-points
|
||||
|
||||
# --- RULE: Encourage descriptive language (existence) ---
|
||||
extends: existence
|
||||
message: "Avoid using '%s'. Try to be more descriptive or direct."
|
||||
level: warning
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- simply
|
||||
- just
|
||||
- easy
|
||||
- easily
|
||||
- simple
|
||||
- basically
|
||||
- obviously
|
||||
- actually
|
||||
- very
|
||||
- really
|
||||
- pretty
|
||||
- quite
|
||||
- rather
|
||||
|
||||
---
|
||||
# --- RULE: Flag incomplete documentation (existence) ---
|
||||
extends: existence
|
||||
message: "Incomplete documentation: '%s' found. Please provide comprehensive details."
|
||||
level: error
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- TBD
|
||||
- TO BE DETERMINED
|
||||
- TODO
|
||||
- FIXME
|
||||
- Placeholder
|
||||
- Coming soon
|
||||
|
||||
---
|
||||
# --- RULE: Preferred terminology (substitution) ---
|
||||
extends: substitution
|
||||
message: "Consider using '%s' instead of its informal or less descriptive counterpart."
|
||||
level: suggestion
|
||||
ignorecase: true
|
||||
swap:
|
||||
check[ -]box: checkbox
|
||||
right-click menu: context menu|popup menu
|
||||
webpage: page
|
||||
click on: click|select
|
||||
press: press|select
|
||||
setup: set up
|
||||
log[ -]in: sign in|log in
|
||||
e-mail: email
|
||||
interface: UI|interface
|
||||
the following: :
|
||||
utilize: use
|
||||
functionality: feature|function
|
||||
additional: more|extra
|
||||
|
||||
---
|
||||
# --- RULE: Avoid jargon and filler (existence) ---
|
||||
extends: existence
|
||||
message: "Avoid jargon or filler phrases like '%s'."
|
||||
level: warning
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- leverage
|
||||
- bandwidth
|
||||
- synergy
|
||||
- best-in-class
|
||||
- cutting-edge
|
||||
- robust
|
||||
- state-of-the-art
|
||||
- mission-critical
|
||||
- go-forward
|
||||
- paradigm shift
|
||||
@@ -0,0 +1,76 @@
|
||||
# Copenhagen Truck Wash API — Writerside Style Guide
|
||||
# This file defines the style rules for our documentation.
|
||||
# For more details, see https://vale.sh/docs/topics/styles/#extension-points
|
||||
|
||||
# --- RULE: Encourage descriptive language (existence) ---
|
||||
extends: existence
|
||||
message: "Avoid using '%s'. Try to be more descriptive or direct."
|
||||
level: warning
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- simply
|
||||
- just
|
||||
- easy
|
||||
- easily
|
||||
- simple
|
||||
- basically
|
||||
- obviously
|
||||
- actually
|
||||
- very
|
||||
- really
|
||||
- pretty
|
||||
- quite
|
||||
- rather
|
||||
|
||||
---
|
||||
# --- RULE: Flag incomplete documentation (existence) ---
|
||||
extends: existence
|
||||
message: "Incomplete documentation: '%s' found. Please provide comprehensive details."
|
||||
level: error
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- TBD
|
||||
- TO BE DETERMINED
|
||||
- TODO
|
||||
- FIXME
|
||||
- Placeholder
|
||||
- Coming soon
|
||||
|
||||
---
|
||||
# --- RULE: Preferred terminology (substitution) ---
|
||||
extends: substitution
|
||||
message: "Consider using '%s' instead of its informal or less descriptive counterpart."
|
||||
level: suggestion
|
||||
ignorecase: true
|
||||
swap:
|
||||
check[ -]box: checkbox
|
||||
right-click menu: context menu|popup menu
|
||||
webpage: page
|
||||
click on: click|select
|
||||
press: press|select
|
||||
setup: set up
|
||||
log[ -]in: sign in|log in
|
||||
e-mail: email
|
||||
interface: UI|interface
|
||||
the following: :
|
||||
utilize: use
|
||||
functionality: feature|function
|
||||
additional: more|extra
|
||||
|
||||
---
|
||||
# --- RULE: Avoid jargon and filler (existence) ---
|
||||
extends: existence
|
||||
message: "Avoid jargon or filler phrases like '%s'."
|
||||
level: warning
|
||||
ignorecase: true
|
||||
tokens:
|
||||
- leverage
|
||||
- bandwidth
|
||||
- synergy
|
||||
- best-in-class
|
||||
- cutting-edge
|
||||
- robust
|
||||
- state-of-the-art
|
||||
- mission-critical
|
||||
- go-forward
|
||||
- paradigm shift
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE categories
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
|
||||
<categories>
|
||||
<category id="api" name="API Reference" order="1"/>
|
||||
<category id="guides" name="Guides" order="2"/>
|
||||
</categories>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE instance-profile
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
|
||||
|
||||
<instance-profile id="ctw"
|
||||
name="Copenhagen Truck Wash API" start-page="Introduction.topic">
|
||||
|
||||
<toc-element topic="Introduction.topic"/>
|
||||
<toc-element topic="API-Overview.topic">
|
||||
<toc-element topic="Authentication.topic"/>
|
||||
<toc-element topic="Error-Handling.topic"/>
|
||||
</toc-element>
|
||||
</instance-profile>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topic
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||
title="API Overview" id="API-Overview">
|
||||
|
||||
<p>This section provides a high-level overview of how to interact with the API.</p>
|
||||
|
||||
<chapter title="Base URL" id="base-url">
|
||||
<code-block lang="text">
|
||||
https://api.truckwash.dk/api/v1
|
||||
</code-block>
|
||||
</chapter>
|
||||
|
||||
<chapter title="Common Headers" id="common-headers">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Header</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Content-Type</td>
|
||||
<td>Should be application/json for all POST/PUT requests.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Accept</td>
|
||||
<td>application/json is recommended.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</chapter>
|
||||
</topic>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topic
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||
title="Authentication" id="Authentication">
|
||||
|
||||
<p>All API requests must be authenticated using an API token.</p>
|
||||
|
||||
<chapter title="API Token" id="api-token">
|
||||
<p>Include your token in the Authorization header as a Bearer token:</p>
|
||||
<code-block lang="http">
|
||||
Authorization: Bearer YOUR_API_TOKEN
|
||||
</code-block>
|
||||
</chapter>
|
||||
</topic>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topic
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||
title="Error Handling" id="Error-Handling">
|
||||
|
||||
<p>This section details how the API handles and reports errors.</p>
|
||||
|
||||
<chapter title="Standard Error Format" id="error-format">
|
||||
<p>Errors are returned as a JSON object with an error message and code:</p>
|
||||
<code-block lang="json">
|
||||
{
|
||||
"success": false,
|
||||
"message": "Invalid API token",
|
||||
"code": "AUTH_001"
|
||||
}
|
||||
</code-block>
|
||||
</chapter>
|
||||
|
||||
<chapter title="HTTP Status Codes" id="status-codes">
|
||||
<p>The API uses standard HTTP status codes:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Code</td>
|
||||
<td>Meaning</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>200</td>
|
||||
<td>OK - Request succeeded</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>Bad Request - Invalid parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>401</td>
|
||||
<td>Unauthorized - Missing or invalid token</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>Forbidden - Insufficient permissions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>404</td>
|
||||
<td>Not Found - Resource does not exist</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>Server Error - Internal server failure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</chapter>
|
||||
</topic>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topic
|
||||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
||||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
||||
title="Introduction" id="Introduction">
|
||||
|
||||
<p>Welcome to the %product% documentation.</p>
|
||||
<p>This API provides access to the Copenhagen Truck Wash system, allowing you to manage wash bookings, vehicle data, and customer information.</p>
|
||||
|
||||
<chapter title="Overview" id="overview">
|
||||
<p>The API is built on REST principles and returns JSON-encoded responses.</p>
|
||||
</chapter>
|
||||
</topic>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
|
||||
<vars>
|
||||
<var name="product" value="Copenhagen Truck Wash API"/>
|
||||
</vars>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
|
||||
|
||||
<ihp version="2.0">
|
||||
<topics dir="topics" web-path="topics"/>
|
||||
<images dir="images" web-path="images"/>
|
||||
<instance src="ctw.tree"/>
|
||||
</ihp>
|
||||
+2299
-3331
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user