Skip to content

Commit

Permalink
Merge pull request #140 from ralfhandl/respec
Browse files Browse the repository at this point in the history
Mimic current OpenAPI spec layout
  • Loading branch information
ralfhandl authored Jul 8, 2024
2 parents 4ae786e + b08dcba commit 35ecf71
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 177 deletions.
124 changes: 71 additions & 53 deletions doc/moonwalk.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"OAS",
"Swagger",
"API"
]
],
"scripts": {
"build": "pwsh scripts/Generate.ps1"
}
}
21 changes: 21 additions & 0 deletions specification/moonwalk-host.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
</head>

<body>
<style>
/* Override the default respec styling */
pre > code { background: hsl(24, 20%, 95%); display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
h1,h2,h3 { color: #629b34; }
p#w3c-state { color: #629b34; }
p#dt-published { color: #629b34; }
a[href] { color: #45512c; }
body:not(.toc-inline)
#toc h2 { color: #45512c; }
body:not(.toc-inline) #toc h2 { color: #45512c; }
table { display: block; width: 100%; overflow: auto; }
table th { font-weight: 600; }
table th, table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
table tr { background-color: #fff; border-top: 1px solid #c6cbd1; }
table tr:nth-child(2n) { background-color: #f6f8fa; }
pre { background-color: #f6f8fa !important; }
/* .dt-published::before { content: "Published "; } */ /* Uncomment to add "Published" before the publication date */
</style>

<p class="copyright">© 2024 the Linux Foundation</p>

<!-- CONTENT -->

</body>
Expand Down
116 changes: 23 additions & 93 deletions specification/moonwalk-source.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@

<style>
/* Override the default respec styling */
pre > code { background: hsl(24, 20%, 95%); display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
h1,h2,h3 { color: #629b34; }
p#w3c-state { color: #629b34; }
p#dt-published { color: #629b34; }
a[href] { color: #45512c; }
body:not(.toc-inline)
#toc h2 { color: #45512c; }
body:not(.toc-inline) #toc h2 { color: #45512c; }
table { display: block; width: 100%; overflow: auto; }
table th { font-weight: 600; }
table th, table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
table tr { background-color: #fff; border-top: 1px solid #c6cbd1; }
table tr:nth-child(2n) { background-color: #f6f8fa; }
pre { background-color: #f6f8fa !important; }
</style>
<section class="introductory">

## Current Status of Document

This contents of this document have been gathered from a combination of the 3.1 specification and proposed changes for Moonwalk. <strong>None of the content in this document should be considered as product of consensus.</strong> This is a working document for the purposes of getting the mechanics of publishing a document in place and beginning to discuss the overall structure of the document.
This contents of this document have been gathered from a combination of the 3.1 specification and proposed changes for Moonwalk. <strong>None of the content in this document should be considered as product of consensus.</strong> This is a working document for the purposes of getting the mechanics of publishing a document in place and beginning to discuss the overall structure of the document.

</section>

<section id="abstract">
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

</section>

<section id="conformance" class="introductory">

This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).

This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
</section>


## Introduction

## Definitions
Expand All @@ -53,179 +32,130 @@ This document is licensed under [The Apache License, Version 2.0](https://www.ap

### Data Types


#### Working With Binary Data


##### Migrating binary descriptions from OAS 3.0


### Rich Text Formatting

### Relative References in URIs


### Relative References in URLs


### Referencing Imports

#### Using Imported Names


#### Referencing a Complete Document


#### Locating and Loading Imported Resources


#### Security Considerations for URL Retrieval



### Specification Extensions


## Document Processing

#### Parsing Documents


#### Structural Interoperability


#### Resolving Implicit Connections


#### Undefined and Implementation-Defined Behavior



## OpenAPI Document Structure


##### General Fixed Fields


#### Info Object


##### Fixed Fields {#info-object-fixed-fields}


##### Info Object Example


#### Contact Object


##### Fixed Fields


##### Contact Object Example


#### License Object


##### Fixed Fields


##### License Object Example


#### Components Object


#### Import Object

##### Fixed Fields



### API Shape


##### Shape Fixed Fields


#### Operation Object


##### Fixed Fields


##### Operation Object Example



### API Deployment


##### Deployment Fixed Fields


##### Deployment Example


#### Deployment Object

##### Deployment Fixed Fields


#### Security Scheme Object


##### Fixed Fields

#### Credential Object


##### Field Fields


#### Security Config Object

##### ApiKey Config Object


##### OAuth2 Config Object

##### OIDC Config Object

##### OIDC Config Object


##### HTTP Config Object



##### HTTP Config Object

## Appendix

<section class="appendix">

## Revision History

Version | Date | Notes
--- | --- | ---
3.1.0 | 2021-02-15 | Release of the OpenAPI Specification 3.1.0
3.1.0-rc1 | 2020-10-08 | rc1 of the 3.1 specification
3.1.0-rc0 | 2020-06-18 | rc0 of the 3.1 specification
3.0.3 | 2020-02-20 | Patch release of the OpenAPI Specification 3.0.3
3.0.2 | 2018-10-08 | Patch release of the OpenAPI Specification 3.0.2
3.0.1 | 2017-12-06 | Patch release of the OpenAPI Specification 3.0.1
3.0.0 | 2017-07-26 | Release of the OpenAPI Specification 3.0.0
3.0.0-rc2 | 2017-06-16 | rc2 of the 3.0 specification
3.0.0-rc1 | 2017-04-27 | rc1 of the 3.0 specification
3.0.0-rc0 | 2017-02-28 | Implementer's Draft of the 3.0 specification
2.0 | 2015-12-31 | Donation of Swagger 2.0 to the OpenAPI Initiative
2.0 | 2014-09-08 | Release of Swagger 2.0
1.2 | 2014-03-14 | Initial release of the formal document.
1.1 | 2012-08-22 | Release of Swagger 1.1
1.0 | 2011-08-10 | First release of the Swagger Specification
| Version | Date | Notes |
| --------- | ---------- | ------------------------------------------------- |
| 3.1.0 | 2021-02-15 | Release of the OpenAPI Specification 3.1.0 |
| 3.1.0-rc1 | 2020-10-08 | rc1 of the 3.1 specification |
| 3.1.0-rc0 | 2020-06-18 | rc0 of the 3.1 specification |
| 3.0.3 | 2020-02-20 | Patch release of the OpenAPI Specification 3.0.3 |
| 3.0.2 | 2018-10-08 | Patch release of the OpenAPI Specification 3.0.2 |
| 3.0.1 | 2017-12-06 | Patch release of the OpenAPI Specification 3.0.1 |
| 3.0.0 | 2017-07-26 | Release of the OpenAPI Specification 3.0.0 |
| 3.0.0-rc2 | 2017-06-16 | rc2 of the 3.0 specification |
| 3.0.0-rc1 | 2017-04-27 | rc1 of the 3.0 specification |
| 3.0.0-rc0 | 2017-02-28 | Implementer's Draft of the 3.0 specification |
| 2.0 | 2015-12-31 | Donation of Swagger 2.0 to the OpenAPI Initiative |
| 2.0 | 2014-09-08 | Release of Swagger 2.0 |
| 1.2 | 2014-03-14 | Initial release of the formal document. |
| 1.1 | 2012-08-22 | Release of Swagger 1.1 |
| 1.0 | 2011-08-10 | First release of the Swagger Specification |

</section>

<section class="appendix" id="issue-summary">
<!-- A list of issues will magically appear here -->
</section>
</section>
85 changes: 55 additions & 30 deletions specification/respecConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,59 @@
// work with the example here https://github.com/speced/respec/wiki/pre-and-code-elements

var respecConfig = {
//preProcess: [loadYaml],
// isPreview: true,
format: "markdown",
noTOC: false,
maxTocLevel: 3,
// additionalCopyrightHolders: "the Linux Foundation",
// includePermalinks: true,
latestVersion: "https://spec.openapis.org/oas/v3.1.0",
github: {
repoURL: "https://github.com/OAI/sig-moonwalk/",
branch: "main"
// preProcess: [loadYaml],
// isPreview: true,
format: "markdown",
// maxTocLevel: 3,
latestVersion: "https://oai.github.io/sig-moonwalk/moonwalk.html",
edDraftURI:
"https://github.com/OAI/sig-moonwalk/blob/main/specification/moonwalk-source.md",
subtitle: "Version 4.0.0-draft",
// publishDate: "yyyy-mm-dd",
logos: [
{
src: "https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png",
alt: "OpenAPI Initiative",
height: 48,
url: "https://openapis.org/",
},
logos:[{src:"https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png",alt:"OpenAPI Initiative",height:48,url:"https://openapis.org/"}],
specStatus: "unofficial", //Use "unofficial" for unofficial drafts
shortName: "moonwalk-draft", // This should become part of the latestVersion URL
editors: [
{
name: "TBD"
}
],
localBiblio: {
"CommonMark": {
"title": "CommonMark syntax",
"href": "https://spec.commonmark.org/",
"status": "Living Standard",
"publisher": "John MacFarlane"
}
}

}

],
specStatus: "unofficial", // Use "unofficial" for unofficial drafts, "base" for official versions
shortName: "moonwalk-draft", // This should become part of the latestVersion URL
editors: [
{
name: "TBD",
},
],
otherLinks: [
{
key: "Participate",
data: [
{
value: "GitHub Moonwalk",
href: "https://github.com/OAI/sig-moonwalk/",
},
{
value: "File a bug",
href: "https://github.com/OAI/sig-moonwalk/issues",
},
{
value: "Commit history",
href: "https://github.com/OAI/sig-moonwalk/commits/main/specification/moonwalk-source.md",
},
{
value: "Pull requests",
href: "https://github.com/OAI/sig-moonwalk/pulls",
},
],
},
],
localBiblio: {
CommonMark: {
title: "CommonMark syntax",
href: "https://spec.commonmark.org/",
status: "Living Standard",
publisher: "John MacFarlane",
},
},
};

0 comments on commit 35ecf71

Please sign in to comment.