Skip to content

Commit

Permalink
Chore: cleanup after renaming master to main (#136)
Browse files Browse the repository at this point in the history
* Update nodejs.yml

* rename master to main

Co-authored-by: D024504 <[email protected]>
  • Loading branch information
ralfhandl and HeikoTheissen authored Jul 9, 2021
1 parent 6cb3dd0 commit 319b319
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 304 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
pull_request:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ in the TC's technical activity is invited to <a href="https://www.oasis-open.org
<p>Persons who are not TC members are invited to open issues and provide comments using this repository's <a href="https://github.com/oasis-tcs/odata-vocabularies/issues/new">GitHub Issues</a> tracking facility or using the
TC's <a href="https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata">comment list</a>. All such content created in GitHub Issues and/or posted to the TC's <a href="https://lists.oasis-open.org/archives/odata/">archived comment list</a> is governed by the terms of the <a href="https://www.oasis-open.org/policies-guidelines/ipr#appendixa">OASIS Feedback License</a>.</p>

<p><b>Use of Contributions</b>. As with all OASIS Technical Committee assets (TC <a href="https://wiki.oasis-open.org/">Wiki</a>, TC <a href="https://issues.oasis-open.org/secure/Dashboard.jspa">Issues Tracker</a>, TC <a href="https://lists.oasis-open.org/archives/">General Discussion List archives</a>, TC <a href="http://docs.oasis-open.org/">OASIS Library</a> assets), content placed into this GitHub repository is visible and publicly accessible. Subject to applicable <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/LICENSE.md">licensing</a> rules, the repository content may be re-used freely, including the creation and publication of derivative works.</p>
<p><b>Use of Contributions</b>. As with all OASIS Technical Committee assets (TC <a href="https://wiki.oasis-open.org/">Wiki</a>, TC <a href="https://issues.oasis-open.org/secure/Dashboard.jspa">Issues Tracker</a>, TC <a href="https://lists.oasis-open.org/archives/">General Discussion List archives</a>, TC <a href="http://docs.oasis-open.org/">OASIS Library</a> assets), content placed into this GitHub repository is visible and publicly accessible. Subject to applicable <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/LICENSE.md">licensing</a> rules, the repository content may be re-used freely, including the creation and publication of derivative works.</p>

<p><b>Cloning and forking</b>. May users clone and fork this repository? Yes. Just as versioned content maintained in any OASIS TC's <a href="https://tools.oasis-open.org/version-control/browse/">SVN/Subversion repository</a> may be checked out to a remote SVN repository and used by anyone, this GitHub repository may be forked or cloned for use by any party. Compare, <i>e.g.</i>, <tt>svn checkout https://tools.oasis-open.org/version-control/svn/dita/trunk/doctypes/ dita-doctypes</tt>.</p>

<p>Please see the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/README.md">README</a> for general description of this repository, and the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/LICENSE.md">LICENSE</a> file for licensing.</p>
<p>Please see the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/README.md">README</a> for general description of this repository, and the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/LICENSE.md">LICENSE</a> file for licensing.</p>
</div>
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

<p>Content in this GitHub code repository has been <a href="https://www.oasis-open.org/policies-guidelines/ipr#def-contribution">contributed</a> by OASIS TC Members, and is governed by the OASIS policies, including the <a href="https://www.oasis-open.org/policies-guidelines/ipr">Intellectual Property Rights (IPR) Policy</a>, the <a href="https://www.oasis-open.org/policies-guidelines/tc-process">Technical Committee (TC) Process</a>, <a href="https://www.oasis-open.org/policies-guidelines/bylaws">Bylaws</a>, and the Technical Committee's choice of <a href="https://www.oasis-open.org/policies-guidelines/ipr#def-ipr-mode">IPR Mode</a> (<i>viz</i>, <a href="https://www.oasis-open.org/policies-guidelines/ipr#RF-on-RAND-Mode">RF on RAND Mode</a>), including any applicable <a href="https://www.oasis-open.org/committees/odata/ipr.php">declarations</a>. Feedback from non-TC members, if any, is governed by the terms of the <a href="https://www.oasis-open.org/policies-guidelines/ipr#appendixa">OASIS Feedback License</a>.</p>

<p>Description of this repository is presented in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/README.md">README</a> file, and guidelines for contribution/participation are given in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/CONTRIBUTING.md">CONTRIBUTING</a> file.</p>
<p>Description of this repository is presented in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/README.md">README</a> file, and guidelines for contribution/participation are given in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/CONTRIBUTING.md">CONTRIBUTING</a> file.</p>
</div>
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@

<div>
<h3>Contributions</h3>
<p>As stated in this repository's <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/CONTRIBUTING.md">CONTRIBUTING file</a>, contributors to this repository are expected to be Members of the OASIS OData TC, for any substantive change requests. Anyone wishing to contribute to this GitHub project and <a href="https://www.oasis-open.org/join/participation-instructions">participate</a> in the TC's technical activity is invited to join as an OASIS TC Member. Public feedback is also accepted, subject to the terms of the <a href="https://www.oasis-open.org/policies-guidelines/ipr#appendixa">OASIS Feedback License</a>.</p>
<p>As stated in this repository's <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/CONTRIBUTING.md">CONTRIBUTING file</a>, contributors to this repository are expected to be Members of the OASIS OData TC, for any substantive change requests. Anyone wishing to contribute to this GitHub project and <a href="https://www.oasis-open.org/join/participation-instructions">participate</a> in the TC's technical activity is invited to join as an OASIS TC Member. Public feedback is also accepted, subject to the terms of the <a href="https://www.oasis-open.org/policies-guidelines/ipr#appendixa">OASIS Feedback License</a>.</p>
</div>

<div>
<h3>Licensing</h3>
<p>Please see the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/LICENSE.md">LICENSE</a> file for description of the license terms and OASIS policies applicable to the TC's work in this GitHub project. Content in this repository is intended to be part of the OData TC's permanent record of activity, visible and freely available for all to use, subject to applicable OASIS policies, as presented in the repository <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/LICENSE.md">LICENSE</a> file.</p>
<p>Please see the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/LICENSE.md">LICENSE</a> file for description of the license terms and OASIS policies applicable to the TC's work in this GitHub project. Content in this repository is intended to be part of the OData TC's permanent record of activity, visible and freely available for all to use, subject to applicable OASIS policies, as presented in the repository <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/LICENSE.md">LICENSE</a> file.</p>
</div>

<div>
<h3>Further Description of this Repository</h3>
<p>This repository contains XML sources as well as auto-generated JSON sources and Markdown documentation for the following vocabularies:</p>
</div>

* [Core](vocabularies/Org.OData.Core.V1.md)
* [Capabilities](vocabularies/Org.OData.Capabilities.V1.md)
* [Measures](vocabularies/Org.OData.Measures.V1.md)
* [Validation](vocabularies/Org.OData.Validation.V1.md)
* [Authorization](vocabularies/Org.OData.Authorization.V1.md)
* [Aggregation](vocabularies/Org.OData.Aggregation.V1.md)
* [JSON](vocabularies/Org.OData.JSON.V1.md)
* [Repeatability](vocabularies/Org.OData.Repeatability.V1.md)
* [Temporal](vocabularies/Org.OData.Temporal.V1.md) - *This is a working draft that may incompatibly change any time.*
- [Core](vocabularies/Org.OData.Core.V1.md)
- [Capabilities](vocabularies/Org.OData.Capabilities.V1.md)
- [Measures](vocabularies/Org.OData.Measures.V1.md)
- [Validation](vocabularies/Org.OData.Validation.V1.md)
- [Authorization](vocabularies/Org.OData.Authorization.V1.md)
- [Aggregation](vocabularies/Org.OData.Aggregation.V1.md)
- [JSON](vocabularies/Org.OData.JSON.V1.md)
- [Repeatability](vocabularies/Org.OData.Repeatability.V1.md)
- [Temporal](vocabularies/Org.OData.Temporal.V1.md) - _This is a working draft that may incompatibly change any time._

To learn how to construct an annotation value from a term definition, or vice versa, look here:

* [Annotation Cheat-Sheet for CSDL JSON](docs/annotation-cheat-sheet-json.md)
* [Annotation Cheat-Sheet for CSDL XML](docs/annotation-cheat-sheet.md)
- [Annotation Cheat-Sheet for CSDL JSON](docs/annotation-cheat-sheet-json.md)
- [Annotation Cheat-Sheet for CSDL XML](docs/annotation-cheat-sheet.md)

<div>
<h3>Contact</h3>
Expand Down
12 changes: 6 additions & 6 deletions lib/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Convert OData 4.0x CSDL JSON or XML to Github Flavored Markdown

This script produces Markdown documentation from an OData vocabulary using [CSDL XML](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html) or [CSDL JSON](http://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html) in Version 4.0 or 4.01.
This script produces Markdown documentation from an OData vocabulary using [CSDL XML](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html) or [CSDL JSON](http://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html) in Version 4.0 or 4.01.

It's a pure JavaScript implementation, depending only on [`odata-csdl`](https://github.com/oasis-tcs/odata-csdl-schemas/tree/master/lib), which in turn depends on [`sax js`](https://www.npmjs.com/package/sax).
It's a pure JavaScript implementation, depending only on [`odata-csdl`](https://github.com/oasis-tcs/odata-csdl-schemas/tree/main/lib), which in turn depends on [`sax js`](https://www.npmjs.com/package/sax).

_Note: this tool is only intended for documenting vocabularies, not for documenting metadata documents or annotation files._

Expand All @@ -22,13 +22,13 @@ npm install -g

## Usage

Assuming you installed the script globally, and your vocabulary file is `MyVocabulary.xml`, then
Assuming you installed the script globally, and your vocabulary file is `MyVocabulary.xml`, then

```sh
odata-vocab2md MyVocabulary.xml
```

will create `MyVocabulary.md` next to it.
will create `MyVocabulary.md` next to it.

Just type

Expand All @@ -43,7 +43,7 @@ Usage: odata-vocab2md <options> <source files>
Options:
-h, --help show this info
-t, --target target file (default: source file base name + .md)
```
```

If you installed the script locally, start it via

Expand All @@ -63,4 +63,4 @@ anywhere in this repository.

If you use [Visual Studio Code](https://code.visualstudio.com/), you can [run this script directly from the explorer](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_run-npm-scripts-as-tasks-from-the-explorer).

You should also install the recommended extension for [XML Language Support by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml). It will validate the XML files against the official [OData CDSL XML schemas](https://github.com/oasis-tcs/odata-csdl-schemas/tree/master/schemas).
You should also install the recommended extension for [XML Language Support by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml). It will validate the XML files against the official [OData CDSL XML schemas](https://github.com/oasis-tcs/odata-csdl-schemas/tree/main/schemas).
31 changes: 18 additions & 13 deletions lib/csdl2markdown.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Converts OData CSDL JSON to Github Flavored Markdown
*
* Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/master/lib/csdl2markdown.js
* Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/main/lib/csdl2markdown.js
*/

//TODO
Expand Down Expand Up @@ -241,20 +241,26 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
const depr = deprecated(p);
if (depr) desc = depr.Description;
else desc = descriptionInTable(p);
var emph = o.$IsBound && i === 0
? "**"
: p[voc.Core.OptionalParameter]
? "*"
: "";
var emph =
o.$IsBound && i === 0
? "**"
: p[voc.Core.OptionalParameter]
? "*"
: "";
lines.push(
emph + sourceLink(p) + emph +
emph +
sourceLink(p) +
emph +
experimentalOrDeprecated(p) +
"|" +
typeLink(p) +
"|" +
emph +
(emph === "**" ? "Binding parameter" :
emph === "*" ? "Optional parameter" : "") +
(emph === "**"
? "Binding parameter"
: emph === "*"
? "Optional parameter"
: "") +
(desc && emph ? ":" + emph + " " : emph) +
desc
);
Expand Down Expand Up @@ -535,8 +541,7 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
? " *(" +
typeLink({ $Type: "com.sap.vocabularies.Common.v1.Experimental" }) +
")*"
: "") +
(deprecated(modelElement) ? " *(Deprecated)*" : "")
: "") + (deprecated(modelElement) ? " *(Deprecated)*" : "")
);
}

Expand Down Expand Up @@ -661,7 +666,7 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
!index.schema.$$namespace.startsWith("Org.OData.")
) {
customFile =
"https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/" +
"https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/" +
customFile;
}
}
Expand Down Expand Up @@ -723,7 +728,7 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
"IsURL",
"LongDescription",
"Revisions",
"OptionalParameter"
"OptionalParameter",
],
Validation: [
"AllowedValues",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "odata-vocabularies",
"version": "0.4.4",
"description": "Convert OData vocabularies in CSDL XML or CSDL JSON to GitHub Flavored Markdown",
"homepage": "https://github.com/oasis-tcs/odata-vocabularies/blob/master/lib/README.md",
"homepage": "https://github.com/oasis-tcs/odata-vocabularies/blob/main/lib/README.md",
"bugs": "https://github.com/oasis-tcs/odata-vocabularies/issues",
"repository": {
"type": "git",
Expand Down
17 changes: 9 additions & 8 deletions test/csdl2markdown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ describe("Non-OASIS Vocabularies", function () {
const vocabulary = {
$Version: "4.01",
$Reference: {
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
$Include: [
{
$Namespace: "Org.OData.Core.V1",
},
],
},
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json":
{
$Include: [
{
$Namespace: "Org.OData.Core.V1",
},
],
},
"Another.xml": {
$Include: [
{
Expand Down Expand Up @@ -96,7 +97,7 @@ describe("Non-OASIS Vocabularies", function () {
"",
"Term|Type|Description",
":---|:---|:----------",
'Foo *(Deprecated)*|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="Foo"></a>Use term `Foo` from the OASIS Core vocabulary instead',
'Foo *(Deprecated)*|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="Foo"></a>Use term `Foo` from the OASIS Core vocabulary instead',
'Bar|[Type](Another.md#Type)|<a name="Bar"></a>',
"",
];
Expand Down
9 changes: 3 additions & 6 deletions tools/V4-CSDL-normalize-Target.xsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" xmlns:json="http://json.org/"
xmlns:nodeinfo="xalan://org.apache.xalan.lib.NodeInfo"
>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" xmlns:json="http://json.org/" xmlns:nodeinfo="xalan://org.apache.xalan.lib.NodeInfo">
<!--
This style sheet normalizes Target attribute values to alias-qualified names
Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/master/tools/V4-normalize-Target.xsl
Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/main/tools/V4-normalize-Target.xsl
-->

Expand Down Expand Up @@ -204,4 +201,4 @@
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>
6 changes: 3 additions & 3 deletions tools/V4-CSDL-to-JSON.xsl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:edm="http://docs.oasis-open.org/odata/ns/edm" xmlns:json="http://json.org/" xmlns:nodeinfo="xalan://org.apache.xalan.lib.NodeInfo">
<!--
This style sheet transforms OData 4.0 CSDL XML documents into CSDL JSON
Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/master/tools/V4-CSDL-to-JSON.xsl
Latest version: https://github.com/oasis-tcs/odata-vocabularies/blob/main/tools/V4-CSDL-to-JSON.xsl
TODO:
- $DefaultValue depending on @Type and $safe-numbers (IEEE754Compatible)
Expand Down Expand Up @@ -1059,4 +1059,4 @@
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>
Loading

0 comments on commit 319b319

Please sign in to comment.