Issue 37 Add Data Dictionary testing to the RESO Commmander (#41)
* Added DD Spreadsheet, Command Line option, and parser * Initial check-in of DD generator and generated .feature files for 1.7 resources * Added file naming and header info to the generated files, regenerated Gluecode * Changed generator templates * Added support for additional DD resources and updated generator * Added new Commander build * Changed templates * Refactored generator and changed DD templates * Refactored WorksheetProcessor into base class * Added EDMX Generator * Added better EDMX generation * Intermediate check-in for EDMX processor * Added dependency injection of test containers, changed from Java8 Lambda test expressions to functions * Added skip logic and resource tags to generators * Generated new tests and improved skipped test messaging * Corrected Test Template * Finished first round of DD tests: field presence * Expanded field map to include all resources rather than just the one included in the Web API test * DD test generator intermediate check-in * EDMX Generator build enumerations generator * EDMX generator can generate valid EDMX files. See: /src/main/resources * Re-generated EDMX and BDD Tests from sanitized spreadsheet * Issue #30 - Convert Web API Server tests to Core, and remove Date Part comparisons * Updated DD BDD test format * Wrapped up test templates and generated new BDD acceptance tests * Cleaned up EDMX generation * Wrapped up first round of EDMX generation using Key (but not KeyNumeric). Metadata validation passes on generated file * Updated EDMX generator with Single and Multiple Enumerations * Updated reference XSLX, generated new EDMX and BDD Tests * Added updated BDD generators with improved tags and addedcomments with descriptions in the generated EDMX * Added generation of comments for both Standard Fields and Standard Enumerations, and also added a StandardEnumeration class and builder * Updated reference EDMX and BDD test generators to use Collections of enumerations rather than multi-select enum types. Added newly generated EDMX and BDD tests * Added the ability to generate Standard Relationships into NavigationProperty definitions * Added updated reference EDMX document * Updated Standard Relationships and re-generated EDMX and Open API definitions * Removed Partner Property Definitions and extra info logging * Added Data Dictionary tests for Collections, TODO: README and non-collection based enumerations * Issue #37 - added support for multiple enumerations that use IsFlags=true * Issue #37 - added better reporting * Issue #37 - Allow Edm.Double in addition to Edm.Decimal as per Cert group 10/1/2020 call * Issue #37 - added Gradle task to generate minimal 'pretty' reports. * Issue #37 - added updated .JAR and updated build.gradle * Issue #37 - Added additional error information to test results * Issue #37 - Added BDD generation for Lookups and stubs for testing. Prepended 'sample' to the RESOScript templates * Issue #37 - committing new BDD tests * Issue #37 - Added enumeration MAY and MUST support * Issue #37 - Added field-level synonyms checking and fixed invalid synonyms in DD sheet * Issue #37 - added test to check that closed enumerations only have standard values * Issue #37 - added better logging, including more info about standard vs. non-standard enumerations * Issue #37 - further improvement of OData type error messages * Issue #37 - Added fuzzy matching of enumerations using Levenshtein distance * Issue #37 - Improved Edit Distance behavior, added IgnoredItem and ignored.json, and updated Vha, Usda, and Fha with VHA, USDA, and FHA * Issue #37 - Added better error messages, --strict=true for strict testing mode, and metadata-report.json to output results to aggregation server * Issue #37 - Added auto-generating output directory as well as a generateCertificationReports_DD_1_7 task that takes -DpathToJsonResults from the cert task and creates a pretty report * Issue #37 - Added better error message formatting and handling, and help messages for gradle tasks * Issue #37 - updated README and fixed some of the existing Web API Commander JAR tasks, as well as improved the all-in-one generateCertificationReport task * Issue #37 - Cleaned up some items in the README and message output * Update README.md
This commit is contained in:
parent
017348cf1b
commit
e6e1af4b5d
|
@ -0,0 +1,21 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Commander Acceptance Tests" type="CucumberJavaRunConfigurationType" factoryName="Cucumber java">
|
||||
<option name="CUCUMBER_CORE_VERSION" value="4.5" />
|
||||
<option name="FILE_PATH" value="$PROJECT_DIR$/src/test/java/org/reso/commander/test/features" />
|
||||
<option name="GLUE" value="org.reso.commander.test.stepdefs" />
|
||||
<option name="MAIN_CLASS_NAME" value="io.cucumber.core.cli.Main" />
|
||||
<module name="web-api-commander.test" />
|
||||
<option name="PROGRAM_PARAMETERS" value=" --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter --strict" />
|
||||
<option name="SUGGESTED_NAME" value="Feature: web-api-server-1.0.2" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="io.cucumber.core.cli.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="testDataDictionaryReferenceMetadata_1_7" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -0,0 +1,21 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Feature: DataDictionary 1.7 - Local Metadata" type="CucumberJavaRunConfigurationType" factoryName="Cucumber java">
|
||||
<option name="CUCUMBER_CORE_VERSION" value="4.5" />
|
||||
<option name="FILE_PATH" value="$PROJECT_DIR$/src/main/java/org/reso/certification/features/data-dictionary/v1-7-0/" />
|
||||
<option name="GLUE" value="org.reso.certification.stepdefs" />
|
||||
<option name="MAIN_CLASS_NAME" value="io.cucumber.core.cli.Main" />
|
||||
<module name="web-api-commander.main" />
|
||||
<option name="PROGRAM_PARAMETERS" value=" --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter --strict" />
|
||||
<option name="SUGGESTED_NAME" value="Feature: web-api-server-1.0.2" />
|
||||
<option name="VM_PARAMETERS" value="-DpathToMetadata=$PROJECT_DIR$/src/main/resources/RESODataDictionary-1.7.edmx -Dcucumber.filter.tags=""" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="io.cucumber.core.cli.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -1,4 +1,4 @@
|
|||
FROM gradle:jdk8 AS builder
|
||||
FROM gradle:6.2.1-jdk8 AS builder
|
||||
|
||||
WORKDIR /home/gradle/project
|
||||
|
||||
|
|
672
README.md
672
README.md
|
@ -1,358 +1,228 @@
|
|||
|
||||
# RESO Web API Commander
|
||||
|
||||
[![CodeFactor](https://www.codefactor.io/repository/github/resostandards/web-api-commander/badge)](https://www.codefactor.io/repository/github/resostandards/web-api-commander) ![Java CI with Gradle](https://github.com/RESOStandards/web-api-commander/workflows/Java%20CI%20with%20Gradle/badge.svg?branch=master)
|
||||
|
||||
The RESO Web API Commander is a command line Java application that uses
|
||||
the Apache Olingo library to provide OData Client functionality as well as RESO Web API and Data Dictionary Certification.
|
||||
|
||||
- [Getting Started](#getting-started)
|
||||
- [Using the Commander as a Web API Client](#using-the-commander-as-a-web-api-client)
|
||||
- [Display Help](#display-help)
|
||||
- [Authentication](#authentication)
|
||||
- [Getting Metadata](#getting-metadata)
|
||||
- [Validating Metadata stored in an EDMX file](#validating-metadata-stored-in-an-edmx-file)
|
||||
- [Getting results from a given `uri`](#getting-results-from-a-given-uri)
|
||||
- [Getting raw results from a given `uri`](#getting-raw-results-from-a-given-uri)
|
||||
- [Converting metadata to Open API 2 format](#converting-metadata-to-open-api-2-format)
|
||||
- [Running RESOScript Files](#running-resoscript-files)
|
||||
- [Automated Web API Testing (beta)](#automated-web-api-testing-beta)
|
||||
* [Cucumber Feature Specifications](#cucumber-feature-specifications)
|
||||
* [Testing Environment](#testing-environment)
|
||||
* [Web API Usage](#web-api-usage)
|
||||
* [Running Web API Tests with the Gradle Wrapper](#running-web-api-tests-with-the-gradle-wrapper)
|
||||
* [Convenience Methods for Web API 1.0.2 Server Core Certification](#convenience-methods-for-web-api-102-server-core-certification)
|
||||
* [Web API Program Output](#web-api-program-output)
|
||||
- [Docker](#docker)
|
||||
- [Logging](#logging)
|
||||
- [Gradle Commands](#gradle-commands)
|
||||
- [Coming Soon](#coming-soon)
|
||||
The RESO Web API Commander is an OData client library and command-line client, as well as an automated RESO Certification testing tool.
|
||||
|
||||
## Getting Started
|
||||
|
||||
There are essentially two ways to run the Commander:
|
||||
* [As a Web API Client](#using-the-commander-as-a-web-api-client)
|
||||
* As an automated testing tool for the [Web API](#web-api-usage) or [Data Dictionary](#data-dictionary-usage)
|
||||
To begin using the Commander, choose one of the following topics:
|
||||
* [Command-line Web API Tools](#command-line-web-api-tools)
|
||||
* [RESO Certification](#reso-certification)
|
||||
* [Commander as a Web API client library](#using-the-commander-as-a-web-api-client-library)
|
||||
|
||||
|
||||
### Using the Commander as a Web API Client
|
||||
# Command-line Web API Tools
|
||||
**Introduction**
|
||||
* [Java Requirements](#java-requirements)
|
||||
* [Display Help](#display-help)
|
||||
* [Authentication](#authentication)
|
||||
|
||||
Your operating system probably already has Java installed, but you need 1.8.0 to run the Commander.
|
||||
**Client Commands**
|
||||
* [Getting Metadata](#getting-metadata)
|
||||
* [Validating Metadata stored in an EDMX file](#validating-metadata-stored-in-an-edmx-file)
|
||||
* [Saving Results from a Given `uri`](#saving-results-from-a-given-uri)
|
||||
* [Running RESOScript Files](#running-resoscript-files)
|
||||
|
||||
To check your version, type:
|
||||
|
||||
**Additional Commands**
|
||||
* [Generating RESO Data Dictionary Acceptance Tests](#generating-reso-data-dictionary-acceptance-tests)
|
||||
* [Generating RESO Data Dictionary Reference Metadata](#generating-reso-data-dictionary-reference-metadata)
|
||||
* [Converting metadata to Open API 3 format](#converting-metadata-to-open-api-3-format)
|
||||
|
||||
## Java Requirements
|
||||
Your operating system probably already has a Java Runtime Environment (JRE) installed. This is all you need to run the [Commander as a Web API Client](#using-the-commander-as-a-web-api-client).
|
||||
|
||||
To check your version of Java, type the following in a command line environment:
|
||||
```
|
||||
$ java -version
|
||||
```
|
||||
|
||||
in your operating system's terminal and you will see something similar to the following:
|
||||
|
||||
If you have the Java SE Runtime Environment installed, the output will look similar to the following:
|
||||
```
|
||||
$ java -version
|
||||
openjdk version "1.8.0_242"
|
||||
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~19.10-b08)
|
||||
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
|
||||
Java version "1.8.x" (or a higher version)
|
||||
Java<TM> SE Runtime Environment ...
|
||||
```
|
||||
If you don't see something like this, you need to install the [Java SE](https://www.oracle.com/java/technologies/javase-jre8-downloads.html) runtime.
|
||||
|
||||
If you don't see something similar to this, with 1.8.0, or an error, you may need to download a Java SDK Environment.
|
||||
|
||||
[Open JDK is recommended](https://openjdk.java.net/install/index.html).
|
||||
|
||||
[Oracle's SE Development kit may also be used](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html), but there may be additional licensing terms to accept.
|
||||
|
||||
Once you have done this, you can [download the Commander JAR file](https://github.com/RESOStandards/web-api-commander/tree/master/build/libs)
|
||||
and use it for the operations which support using the Commander as a Web API client.
|
||||
For automated testing, see [here](#automated-web-api-testing-beta) instead.
|
||||
Once the Java SE Runtime is installed, you may [download the Commander JAR file](build/libs/web-api-commander.jar)
|
||||
|
||||
## Display Help
|
||||
|
||||
Assuming [you have downloaded `web-api-commander.jar`](https://github.com/RESOStandards/web-api-commander/tree/master/build/libs) at this point, help is available from the command line by passing `--help` OR just passing no arguments.
|
||||
|
||||
Assuming [you've downloaded `web-api-commander.jar`](build/libs/web-api-commander.jar) at this point, help is available from the command line by passing `--help` or just passing no arguments, as follows:
|
||||
```
|
||||
/path/to/web-api-commander$ java -jar web-api-commander.jar
|
||||
$ java -jar path/to/web-api-commander.jar
|
||||
```
|
||||
|
||||
Doing so displays the following information:
|
||||
|
||||
```
|
||||
usage: java -jar web-api-commander
|
||||
--bearerToken <b> Bearer token to be used with the request.
|
||||
--contentType <t> Results format: JSON (default),
|
||||
JSON_NO_METADATA, JSON_FULL_METADATA, XML.
|
||||
--convertEDMXtoOpenAPI Converts EDMX in <inputFile> to Open API, saving it
|
||||
in <inputFile>.swagger.json
|
||||
--entityName <n> The name of the entity to fetch, e.g.
|
||||
Property.
|
||||
--getEntities Executes GET on <uri> using the given
|
||||
<bearerToken> and optional <serviceRoot> when
|
||||
--useEdmEnabledClient is specified. Optionally
|
||||
takes a <limit>, which will fetch that number
|
||||
of results. Pass --limit -1 to fetch all
|
||||
results.
|
||||
--getMetadata Fetches metadata from <serviceRoot> using
|
||||
<bearerToken> and saves results in
|
||||
<outputFile>.
|
||||
--help print help
|
||||
--inputFile <i> Path to input file.
|
||||
--limit <l> The number of records to fetch, or -1 to fetch
|
||||
all.
|
||||
--outputFile <o> Path to output file.
|
||||
--runRESOScript Runs commands in RESOScript file given as
|
||||
<inputFile>.
|
||||
--saveRawGetRequest Performs GET from <requestURI> using the given
|
||||
<bearerToken> and saves output to
|
||||
<outputFile>.
|
||||
--serviceRoot <s> Service root URL on the host.
|
||||
--uri <u> URI for raw request. Use 'single quotes' to
|
||||
enclose.
|
||||
--useEdmEnabledClient present if an EdmEnabledClient should be used.
|
||||
--validateMetadata Validates previously-fetched metadata in the
|
||||
<inputFile> path.
|
||||
|
||||
--bearerToken <b> Bearer token to be used with the
|
||||
request.
|
||||
--contentType <t> Results format: JSON (default),
|
||||
JSON_NO_METADATA, JSON_FULL_METADATA,
|
||||
XML.
|
||||
--entityName <n> The name of the entity to fetch, e.g.
|
||||
Property.
|
||||
--generateDDAcceptanceTests Generates acceptance tests in the
|
||||
current directory.
|
||||
--generateMetadataReport Generates metadata report from given
|
||||
<inputFile>.
|
||||
--generateReferenceEDMX Generates reference metadata in EDMX
|
||||
format.
|
||||
--getMetadata Fetches metadata from <serviceRoot>
|
||||
using <bearerToken> and saves results in
|
||||
<outputFile>.
|
||||
--help print help
|
||||
--inputFile <i> Path to input file.
|
||||
--outputFile <o> Path to output file.
|
||||
--runRESOScript Runs commands in RESOScript file given
|
||||
as <inputFile>.
|
||||
--saveGetRequest Performs GET from <requestURI> using the
|
||||
given <bearerToken> and saves output to
|
||||
<outputFile>.
|
||||
--serviceRoot <s> Service root URL on the host.
|
||||
--uri <u> URI for raw request. Use 'single quotes'
|
||||
to enclose.
|
||||
--validateMetadata Validates previously-fetched metadata in
|
||||
the <inputFile> path.
|
||||
```
|
||||
|
||||
When using commands, if arguments aren't provided, feedback will be displayed in the terminal, as well as the help screen,
|
||||
which will show how to pass each required argument.
|
||||
When using commands, if required arguments aren't provided, relevant feedback will be displayed in the terminal.
|
||||
|
||||
## Authentication
|
||||
When using the RESO Commander from the terminal, bearer tokens are the currently-supported authentication mechanism.
|
||||
Please see subsequent sections for how to use bearer tokens to accomplish tasks other than fully-automated testing,
|
||||
[discussed elsewhere in this README](#automated-web-api-testing-beta).
|
||||
The RESO Commander only supports passing OAuth2 "Bearer" tokens from the command line at this time. For those using OAuth2 Client Credentials, please see the section on _[Running RESOScript files](#running-resoscript-files)_.
|
||||
|
||||
|
||||
## Getting Metadata
|
||||
To get metadata, use the `--getMetadata` argument with the following
|
||||
To get metadata from a given server, use the `--getMetadata` argument with the following
|
||||
options:
|
||||
|
||||
```
|
||||
$ java -jar web-api-commander.jar --getMetadata --serviceRoot <s> --bearerToken <b> --outputFile <o>
|
||||
$ java -jar path/to/web-api-commander.jar --getMetadata --serviceRoot https://api.server.com/serviceRoot --outputFile metadata.xml --bearerToken abc123
|
||||
```
|
||||
|
||||
where `serviceRoot` is the path to the root of the OData WebAPI server.
|
||||
where `serviceRoot` is the path to the _root_ of the OData WebAPI server.
|
||||
|
||||
Assuming everything goes well, metadata will be retrieved from the host
|
||||
and written to the provided `--outputFile`.
|
||||
|
||||
**Note**: additional validation is done after metadata have been received.
|
||||
Errors in metadata won't cause the program to terminate, but validation
|
||||
information will be displayed. Also, it's worth mentioning that some
|
||||
of the validation error messages "out-of-the-box" from the Olingo
|
||||
Library we're using to validate with can be pretty cryptic. Please
|
||||
open an issue if you find things that need better explanations.
|
||||
|
||||
and written to the provided `--outputFile`, and the following output will be displayed:
|
||||
```
|
||||
Requesting metadata from: https://api.server.com/serviceRoot/$metadata
|
||||
Metadata request succeeded.
|
||||
```
|
||||
|
||||
## Validating Metadata stored in an EDMX file
|
||||
Sometimes it's useful to validate an already-downloaded EDMX file.
|
||||
Sometimes it's useful to validate a local OData XML Metadata (EDMX) file.
|
||||
|
||||
Since parsing EDMX is an incremental process, validation terminates
|
||||
_each time_ invalid items are encountered. Therefore, the workflow for
|
||||
correcting an EDMX document that contains errors would be to run the
|
||||
Since parsing EDMX is an incremental process, validation terminates _each time_ invalid items are encountered. Therefore, the workflow for correcting an EDMX document that contains errors would be to run the
|
||||
Commander repeatedly, fixing errors that are encountered along the way.
|
||||
|
||||
To validate metadata that's already been downloaded, call the Web API
|
||||
Commander with the following options:
|
||||
|
||||
To validate metadata that's already been downloaded, call Commander with the following options,
|
||||
adjusting the `path/to/web-api-commander.jar` and `--inputFile` path for your environment accordingly:
|
||||
```
|
||||
$ java -jar web-api-commander.jar --validateMetadata --inputFile <i>
|
||||
$ java -jar path/to/web-api-commander.jar --validateMetadata --inputFile '/src/main/resources/RESODataDictionary-1.7.edmx'
|
||||
```
|
||||
XML or OData validation errors will be displayed if any issues were found. If successful, the following message
|
||||
should appear:
|
||||
```
|
||||
Checking Metadata for validity...
|
||||
Valid Metadata!
|
||||
```
|
||||
|
||||
where `inputFile` is the path to your EDMX file. Errors will be logged
|
||||
according to the `log4j.properties` file used at runtime.
|
||||
|
||||
## Getting results from a given `uri`
|
||||
|
||||
OData offers additional options for requesting data from a WebAPI server
|
||||
beyond just receiving the raw server response (shown in the next example).
|
||||
|
||||
In this case, the appropriate action is: `--getEntities`, which can be
|
||||
called as follows:
|
||||
## Saving Results from a Given `uri`
|
||||
The `--saveGetRequest` action makes a request to a `--uri` using a given `--bearerToken`, and saves the response to the given `--outputFile`.
|
||||
|
||||
For example:
|
||||
```
|
||||
$ java -jar web-api-commander.jar --getEntities --uri <u> --bearerToken <b> --outputFile <o>
|
||||
$ java -jar build/libs/web-api-commander.jar --saveGetRequest --uri 'https://api.server.com/OData/Property?$filter=ListPrice gt 100000&$top=100' --bearerToken abc123 --outputFile response.json
|
||||
```
|
||||
|
||||
Make sure that any `uri` containing spaces or special characters is
|
||||
wrapped in 'single quotes'.
|
||||
|
||||
When using the `--useEdmEnabledClient` option, results will be verified
|
||||
against Server metadata after being downloaded. If this option is chosen,
|
||||
then `--serviceRoot` is required so that the Web API Commander can pull
|
||||
the Server's metadata in addition to the results from the given `--uri`
|
||||
|
||||
The `getEntitySet` action also supports the `--contentType` option,
|
||||
which will change how results are written. Currently supported options
|
||||
are: `JSON`, `JSON_NO_METADATA`, `JSON_FULL_METADATA`, and `XML`.
|
||||
|
||||
Finally, there's an "experimental" auto-paging option which allows
|
||||
all records to be pulled from the Server. In order to use this option,
|
||||
pass `--limit -1` when using `--getEntities`. In the near future,
|
||||
an auto-resume feature will be added so that if something happens
|
||||
during transfer, the process will resume from the last record consumed.
|
||||
|
||||
|
||||
## Getting raw results from a given `uri`
|
||||
|
||||
If additional processing using the OData Olingo library is not needed,
|
||||
raw requests may be issued against the server instead.
|
||||
|
||||
The `--saveRawGetRequest` action writes the raw response from a GET
|
||||
request to the given `--uri` from the Web API server directly to the
|
||||
given `--outputFile`.
|
||||
|
||||
If the response is successful, it will be written to the specified file and the following will be displayed on the console:
|
||||
```
|
||||
$ java -jar web-api-commander.jar --saveRawGetRequest --uri <u> --bearerToken <b> --outputFile <o>
|
||||
JSON Data fetched from: https://api.server.com/OData/Property?$filter=ListPrice gt 100000&top=100"
|
||||
with response code: 200
|
||||
JSON Response saved to: response.json
|
||||
```
|
||||
|
||||
Results are not checked against Server Metadata and are not written in
|
||||
any specific OData format.
|
||||
|
||||
Make sure that any `uri` containing spaces or special characters is
|
||||
wrapped in 'single quotes'.
|
||||
|
||||
Note: this option is currently being rolled into `--getEntities` with
|
||||
`--contentType RAW`. Documentation will be updated once the change has
|
||||
been made.
|
||||
|
||||
|
||||
## Converting metadata to Open API 2 format
|
||||
|
||||
The WebAPI Commander also supports converting files in EDMX format to
|
||||
OpenAPI / Swagger 2.0 format. This gives servers an alternative
|
||||
representation besides the OData-specific representation used by EDMX.
|
||||
|
||||
It's worth mentioning that translation from EDMX to OpenAPI/Swagger is
|
||||
*lossy*, meaning that some EDMX elements will not be translated. This
|
||||
is due to the fact that EDMX is more specific than OpenAPI, for instance with type
|
||||
representations like Integers.
|
||||
|
||||
The EDMX converter may be called as follows:
|
||||
|
||||
```
|
||||
$ java -jar web-api-commander.jar --convertEDMXtoOpenAPI --inputFile <i>
|
||||
```
|
||||
|
||||
Any errors will be displayed, and the output file is automatically created by appending `.swagger.json` to
|
||||
the given EDMX `inputFile` name.
|
||||
Otherwise, errors will be displayed showing what went wrong during the request.
|
||||
|
||||
|
||||
## Running RESOScript Files
|
||||
The Web API Commander is able to run RESO's XML-based scripting format, otherwise known as a RESOScript.
|
||||
The Web API Commander is able to run files written using RESO's XML-based scripting format, also known as a RESOScript.
|
||||
|
||||
In order to run an RESOScript file, use a command similar to the following:
|
||||
|
||||
```
|
||||
$ java -jar out/web-api-commander.jar --runRESOScript --i /path/to/your/inputFile --useEdmEnabledClient
|
||||
$ java -jar out/web-api-commander.jar --runRESOScript --inputFile /path/to/your/inputFile
|
||||
```
|
||||
|
||||
Notice that the EDM Enabled client has been requested in the above command. This turns on strict OData checking, which
|
||||
performs additional validation on query strings as well as schema validation on responses, among other things.
|
||||
This feature is optional when using the `--runRESOScript` option, and may be omitted. The recommendation is to use it.
|
||||
A results directory will be created from the RESOScript name and timestamp when it was run, and output will be shown as the requests are made.
|
||||
|
||||
When executing the Web API Commander, a results directory will be created as a sibling
|
||||
to the RESOScript file being run, with the directory name being generated from the RESOScript filename
|
||||
and the current timestamp.
|
||||
Results will be saved to the filenames specified in the given RESOScript, and error files will be created when there are exceptions, with an ".ERROR" extension appended to them.
|
||||
|
||||
Within this directory will be a file for each RESOScript request that was run,
|
||||
and those that generated errors will have ".ERROR" appended to them. Error files contain the request that
|
||||
was made as well as the Java exception that was thrown, which most frequently comes from the underlying
|
||||
OLingo library and provides a sufficient amount of information to determine what occurred with the query.
|
||||
**RESOScript File Format**
|
||||
For examples of files using the RESOScript format, see:
|
||||
* [Data Dictionary 1.7 RESOScript Template](sample-data-dictionary.1.7.0.resoscript)
|
||||
* [Web API Core 1.0.2 RESOScript Template](sample-web-api-server.core.1.0.2.resoscript)
|
||||
|
||||
For those wanting more information, a `log4j.properties` file may be created (as shown below), or you may
|
||||
use the DEBUG build of the application located in `/build/libs/` identified by `-DEBUG` in the Commander jar's file name.
|
||||
|
||||
RESOScript files contain zero or more Settings, Parameters, and Requests. For example:
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<OutputScript>
|
||||
<ClientSettings>
|
||||
<ServerName></ServerName>
|
||||
<ServerId></ServerId>
|
||||
<WebAPIURI></WebAPIURI>
|
||||
<AuthorizationURI></AuthorizationURI>
|
||||
<TokenURI></TokenURI>
|
||||
<RedirectURI></RedirectURI>
|
||||
<AuthenticationType></AuthenticationType>
|
||||
<BearerToken></BearerToken>
|
||||
<ClientIdentification></ClientIdentification>
|
||||
<ClientSecret></ClientSecret>
|
||||
<ClientScope></ClientScope>
|
||||
</ClientSettings>
|
||||
<Parameters>
|
||||
<Parameter Name="YourEndpointUrl" Value="https://yourserver.com/api?$filter=..." />
|
||||
</Parameters>
|
||||
<Requests>
|
||||
<Request OutputFile="yourEndpointUrlResponse.json" Url="*Parameter_YourEndpointUrl*" />
|
||||
<!-- ... additional requests -->
|
||||
</Requests>
|
||||
</OutputScript>
|
||||
## Generating RESO Data Dictionary Acceptance Tests
|
||||
The RESO Commander can be used to generate Data Dictionary acceptance tests from the currently approved [Data Dictionary Spreadsheet](src/main/resources/RESODataDictionary-1.7.xlsx).
|
||||
|
||||
The Commander project's copy of the sheet needs to be updated with a copy of the [DD Google Sheet](https://docs.google.com/spreadsheets/d/1SZ0b6T4_lz6ti6qB2Je7NSz_9iNOaV_v9dbfhPwWgXA/edit?usp=sharing) prior to generating reference metadata.
|
||||
|
||||
```
|
||||
|
||||
The XML DTD for this schema is as follows:
|
||||
|
||||
```dtd
|
||||
<!DOCTYPE OutputScript [
|
||||
<!ELEMENT OutputScript (RESOScriptVersion|ClientSettings|Parameters|Requests)*>
|
||||
<!ELEMENT RESOScriptVersion (#PCDATA)>
|
||||
<!ELEMENT ClientSettings (WebAPIURI|AuthenticationType|BearerToken|ClientIdentification|ClientSecret|TokenURI|ClientScope)*>
|
||||
<!ELEMENT WebAPIURI (#PCDATA)>
|
||||
<!ELEMENT AuthenticationType (#PCDATA)>
|
||||
<!ELEMENT BearerToken (#PCDATA)>
|
||||
<!ELEMENT ClientIdentification (#PCDATA)>
|
||||
<!ELEMENT ClientSecret (#PCDATA)>
|
||||
<!ELEMENT TokenURI (#PCDATA)>
|
||||
<!ELEMENT ClientScope (#PCDATA)>
|
||||
<!ELEMENT Parameters (Parameter)*>
|
||||
<!ELEMENT Parameter (#PCDATA)>
|
||||
<!ATTLIST Parameter
|
||||
Name CDATA #REQUIRED
|
||||
Value CDATA #REQUIRED>
|
||||
<!ELEMENT Requests (Request)*>
|
||||
<!ELEMENT Request (#PCDATA)>
|
||||
<!ATTLIST Request
|
||||
OutputFile CDATA #REQUIRED
|
||||
RequestId CDATA #REQUIRED
|
||||
Url CDATA #REQUIRED>
|
||||
]>
|
||||
$ java -jar path/to/web-api-commander.jar --generateDDAcceptanceTests
|
||||
```
|
||||
New Cucumber BDD acceptance tests will be generated and placed in a timestamped directory relative to your current path.
|
||||
|
||||
## Automated Web API Testing (beta)
|
||||
To update the current tests, copy the newly generated ones into the [Data Dictionary BDD `.features` directory](src/main/java/org/reso/certification/features/data-dictionary/v1-7-0), run the `./gradlew build` task, and if everything works as expected, commit the newly generated tests.
|
||||
|
||||
Currently in development is the ability for the Commander to be able to perform fully-automated Web API testing,
|
||||
upon being provided a valid RESOScript file with parameters for the given server.
|
||||
See [the generic Web API Core RESOScript template for more info](./web-api-server.core.1.0.2.resoscript).
|
||||
## Generating RESO Data Dictionary Reference Metadata
|
||||
In addition to generating DD acceptance tests, the RESO Commander can generate reference metadata based on the current reference [Data Dictionary Spreadsheet](src/main/resources/RESODataDictionary-1.7.xlsx).
|
||||
|
||||
### Cucumber Feature Specifications
|
||||
```
|
||||
$ java -jar path/to/web-api-commander.jar --generateReferenceEDMX --inputFile=src/main/resources/RESODataDictionary-1.7.xlsx
|
||||
```
|
||||
In order to update the Commander's version of the reference metadata, update the local copy of the [DD Google Sheet](https://docs.google.com/spreadsheets/d/1SZ0b6T4_lz6ti6qB2Je7NSz_9iNOaV_v9dbfhPwWgXA/edit?usp=sharing) _prior to_ generating metadata, replace [the local copy](src/main/resources/RESODataDictionary-1.7.edmx), and try running automated acceptance tests with `./gradlew build`.
|
||||
|
||||
[Cucumber](https://cucumber.io) is being used to describe acceptance criteria in a higher-level DSL
|
||||
rather than encapsulating all of the test logic code. Cucumber's DSL is called [Gherkin](https://cucumber.io/docs/gherkin/)
|
||||
and essentially allows backing test code to be organized in a logical manner that makes sense to analysts as well as
|
||||
programmers.
|
||||
|
||||
Testing output during runtime has been designed to be easy to read and during each step, the relevant
|
||||
output for the step will be displayed in the terminal or in an IDE if you have chosen to use the testing tool
|
||||
there. This can often be useful if debugging tests as a developer can step through backing test code as it's running
|
||||
and inspect requests and responses in a controlled manner.
|
||||
## Converting metadata to Open API 3 format
|
||||
See documentation regarding running the [nodejs-based tools in odata-openapi/lib/README.md](odata-openapi/lib/README.md).
|
||||
|
||||
### Testing Environment
|
||||
---
|
||||
|
||||
Under the hood, [Gradle](https://gradle.org/) is being used for automation. It works across multiple platforms
|
||||
and is friendly with both Docker and Cucumber so that tests may be automated on CI/CD platforms such as Jenkins,
|
||||
Circle CI, Travis, or similar, and emit standard system codes during regression testing.
|
||||
# RESO Certification
|
||||
* [Java and the JDK](#java-and-the-jdk)
|
||||
* [Cloning Commander Repository](#cloning-commander-repository)
|
||||
* [Cucumber Feature Specifications](#cucumber-feature-specifications)
|
||||
* [Testing Environment](#testing-environment)
|
||||
* [Gradle Wrapper](#gradle-wrapper)
|
||||
* [Automated RESO Web API Core Testing](#automated-reso-web-api-core-testing-in-development)
|
||||
* [Automated RESO Data Dictionary Testing](#automated-reso-data-dictionary-testing)
|
||||
|
||||
It also provides pleasing command line interaction, and plays well with Cucumber by supporting the
|
||||
ability to run individual or multiple tests using tags.
|
||||
|
||||
### Web API Usage
|
||||
## Java and the JDK
|
||||
To run the Commander as an _automated testing tool_, the Java JDK must be installed. The Commander has been tested with JDK 1.8 and 10 at this point. Those using JDK 11+, please [report issues](https://github.com/RESOStandards/web-api-commander/issues) if they arise.
|
||||
|
||||
The Commander may be run in automated testing mode for a Web API 1.0.2 Server Certification using a terminal.
|
||||
You do not need to use the Commander JAR file mentioned elsewhere in this step.
|
||||
Instead, you will run the tests using Gradle for automation against a clean copy of the latest Commander code.
|
||||
To see whether you have the JDK installed, type the following using your local command line environment:
|
||||
```
|
||||
$ java -version
|
||||
```
|
||||
If you have a Java JDK installed, your output will look something like:
|
||||
```
|
||||
$ java -version
|
||||
openjdk version "1.8.0_275"
|
||||
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.10-b01)
|
||||
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
|
||||
```
|
||||
If you don't see something like this, you need to install the JDK:
|
||||
* [Open JDK is recommended](https://openjdk.java.net/install/index.html).
|
||||
* [Oracle's SE Development kit may also be used](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html), but there may be additional licensing terms to accept.
|
||||
|
||||
You will need to download the source code so you can run Gradle in the root of the directory.
|
||||
This assumes that you also have Java 8 (1.8.0) installed, as mentioned elsewhere in this [`README`](#getting-started).
|
||||
## Cloning Commander Repository
|
||||
The Commander may be run in automated testing mode using a terminal. Automated testing assumes that you have a Java 1.8+ JDK installed, as mentioned elsewhere in this [`README`](#java-and-the-jdk).
|
||||
|
||||
First, change into the directory you want to work in and clone the Commander repository.
|
||||
You will need to have Git installed.
|
||||
Chances are you already do, to check, open a command line and type `git` and if it's present,
|
||||
it will print some info about the app. If not, [there are instructions here](https://git-scm.com/downloads).
|
||||
|
||||
You will need to have Git installed. Chances are you already do, to check, open a command line and type `git` and if it's present, it will print some info about the app. If not, [there are installation instructions here](https://git-scm.com/downloads).
|
||||
|
||||
##### MacOS or Linux
|
||||
```
|
||||
|
@ -364,22 +234,77 @@ $ git clone https://github.com/RESOStandards/web-api-commander.git
|
|||
C:\> git clone https://github.com/RESOStandards/web-api-commander.git
|
||||
```
|
||||
|
||||
This will clone the repository into a directory called web-api-commander relative to whatever directory you're currently in,
|
||||
which also means you'll have a fresh copy of the latest code to execute.
|
||||
This will clone the repository into a directory called web-api-commander relative to whatever directory you're currently in, which also means you'll have a fresh copy of the latest code to execute.
|
||||
|
||||
To refresh the code after you have downloaded it, issue the command `$ git pull` in the root of the directory that was just created.
|
||||
|
||||
### Running Web API Tests with the Gradle Wrapper
|
||||
The [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) provides a convenient way to automatically install Gradle when running tests.
|
||||
## Cucumber Feature Specifications
|
||||
|
||||
After you have cloned the repository, as shown in the previous step, change into the directory containing
|
||||
the source code from GitHub. Convenience methods have been provided for the various certification tasks.
|
||||
[Cucumber](https://cucumber.io) is being used to describe acceptance criteria in a higher-level DSL rather than encapsulating all of the test logic code. Cucumber's DSL is called [Gherkin](https://cucumber.io/docs/gherkin/) and essentially allows backing test code to be organized in a logical manner that makes sense to analysts as well as programmers.
|
||||
|
||||
Prior to using the Commander for automated testing, you need to ensure your RESOScript has been created.
|
||||
For Web API 1.0.2 Server Core Certification, use [this resoscript](web-api-server.core.1.0.2.resoscript) as a template.
|
||||
## Testing Environment
|
||||
|
||||
Under the hood, [Gradle](https://gradle.org/) is being used for automation. It works across multiple platforms and is friendly with both Docker and Cucumber so that tests may be automated on CI/CD platforms such as Jenkins, Circle CI, Travis, or similar, and emit standard system codes during regression testing.
|
||||
|
||||
### Convenience Methods for Web API 1.0.2 Server Certification
|
||||
## Gradle Wrapper
|
||||
The [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) provides a convenient way to automatically download Gradle when running tests.
|
||||
|
||||
After you have cloned the repository, as shown in [a previous step](#cloning-commander-repository), change into the directory containing the source code from GitHub. Convenience methods have been provided for the various certification tasks.
|
||||
|
||||
## Gradle Tasks
|
||||
Once the Gradle Wrapper is set up, you should be able to run the `./gradlew tasks` command in from the root of the Commander source directory in a terminal window and see the list of available tasks.
|
||||
```
|
||||
$ ./gradlew tasks
|
||||
|
||||
> Task :tasks
|
||||
|
||||
------------------------------------------------------------
|
||||
Tasks runnable from root project
|
||||
------------------------------------------------------------
|
||||
...
|
||||
```
|
||||
There are both _built-in tasks_ and _RESO tasks_.
|
||||
The following section is what's of interest here:
|
||||
```
|
||||
RESO Certification tasks
|
||||
------------------------
|
||||
generateCertificationReport_DD_1_7 - Runs Data Dictionary 1.7 tests and creates a certification report
|
||||
RESOScript Example:
|
||||
./gradlew generateCertificationReport_DD_1_7 -DpathToRESOScript=/path/to/dd17.resoscript -Dminimal=true -Dstrict=true
|
||||
Metadata File Example:
|
||||
./gradlew generateCertificationReport_DD_1_7 -DpathToMetadata=/path/to/RESODataDictionary-1.7.edmx -Dminimal=true -Dstrict=true
|
||||
To enable strict mode, pass -Dstrict=true. All applicants MUST pass strict mode tests to be certified.
|
||||
|
||||
testDataDictionary_1_7 - Runs Data Dictionary 1.7 Automated Acceptance Tests and generates a "raw" report.
|
||||
RESOScript Example:
|
||||
./gradlew testDataDictionary_1_7 -DpathToRESOScript=/path/to/dd17.resoscript -DshowResponses=true -Dcucumber.filter.tags=""
|
||||
Metadata File Example:
|
||||
./gradlew testDataDictionary_1_7 -DpathToMetadata=/path/to/RESODataDictionary-1.7.edmx -Dcucumber.filter.tags=""
|
||||
To enable strict mode, pass -Dstrict=true. All applicants MUST pass strict mode tests to be certified.
|
||||
|
||||
testDataDictionaryReferenceMetadata_1_7 - Runs Data Dictionary tests against reference metadata
|
||||
|
||||
testWebApiServer_1_0_2_Core - Runs Web API Core 1.0.2 Automated Acceptance Tests.
|
||||
Example:
|
||||
$ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/web-api-core-1.0.2.resoscript -DshowResponses=true
|
||||
```
|
||||
|
||||
## Automated RESO Web API Core Testing (in-development)
|
||||
Automated Web API Core automated testing tools are currently in development. See [Issue 34](https://github.com/RESOStandards/web-api-commander/issues/34) for progress.
|
||||
|
||||
To use the automated RESO testing tools, you must have a [JDK installed](#java-and-the-jdk).
|
||||
|
||||
### Web API Core RESOScript Template
|
||||
To use the Commander for automated Web API Core testing, you need a RESOScript.
|
||||
|
||||
For Web API 1.0.2 Server Core Certification, use [this resoscript](sample-web-api-server.core.1.0.2.resoscript) as a template.
|
||||
|
||||
For more information regarding Parameters and Client Settings, see the [Web API Walkthrough](https://github.com/RESOStandards/web-api-commander/wiki/Walkthrough:-Automated-Web-API-Certification-Using-the-RESO-Commander#configuring-the-resoscript-file) (in-progress).
|
||||
|
||||
### Web API Cucumber Acceptance Tests
|
||||
The Cucumber BDD acceptance tests for Web API 1.0.2 Core certification are [here](https://github.com/RESOStandards/web-api-commander/blob/issue-37-data-dictionary-testing/src/main/java/org/reso/certification/features/web-api/web-api-server.core.1.0.2.feature). If you have any questions, please [send us an email](mailto:dev@reso.org).
|
||||
|
||||
### Gradle Tasks for Web API 1.0.2 Server Certification
|
||||
While you may use tags to filter tests as you choose, explained in the next section, it's convenient
|
||||
to be able to run a predefined set of tests Web API Core Certification.
|
||||
|
||||
|
@ -399,40 +324,7 @@ $ ./gradlew testWebAPIServerCore_1_0_2 -DpathToRESOScript=/path/to/your.web-api-
|
|||
C:\path\to\web-api-commander> gradlew testWebAPIServerCore_1_0_2 -DpathToRESOScript=C:\path\to\your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
|
||||
```
|
||||
|
||||
*Note: the first time you run these tasks, they will take some time as the environment must be configured and
|
||||
code is being compiled from the contents of the source directory downloaded in the previous step.
|
||||
|
||||
#### Advanced feature: Tag Filtering
|
||||
You may also filter by tags. These are the items in the Cucumber .feature files prefixed by an `@` symbol. Expressions
|
||||
may also be used with tags. See the [Cucumber Documentation](https://cucumber.io/docs/cucumber/api/#tags) for more information.
|
||||
|
||||
##### MacOS or Linux
|
||||
```
|
||||
$ gradle testWebAPIServerCore_1_0_2 -DpathToRESOScript=/path/to/your.web-api-server.core.1.0.2.resoscript -Dcucumber.filter.tags="@metadata"
|
||||
```
|
||||
|
||||
##### Windows
|
||||
```
|
||||
C:\path\to\web-api-commander> gradlew.bat testWebAPIServerCore_1_0_2 -DpathToRESOScript=C:\path\to\your.web-api-server.core.1.0.2.resoscript -Dcucumber.filter.tags="@metadata"
|
||||
```
|
||||
|
||||
This would run only the tests marked as `@metadata` in the
|
||||
[Web API Server 1.0.2 `.feature` file](./src/main/java/org/reso/certification/features/web-api/web-api-server.core.1.0.2.feature).
|
||||
|
||||
|
||||
There is still some "glue code" to back the [test descriptions
|
||||
in `.feature` files](./src/main/java/org/reso/certification/features), but it is greatly optimized by the use
|
||||
of [cucumber-jvm](https://github.com/cucumber/cucumber-jvm), which has support for the reuse of backing Java
|
||||
code to cut down on copypasta test development.
|
||||
|
||||
The backing test code is done using [JUnit5](https://junit.org/junit5/). Normally, only those who are contributing
|
||||
test code should need to know about the implementation details of how tests are run.
|
||||
|
||||
Libraries necessary for the Commander to run are included in the [`web-api-commander.jar`](https://github.com/RESOStandards/web-api-commander/blob/master/build/libs/web-api-commander.jar) file, aside from Gradle, which may either be installed on the local machine, or used within a Docker container (coming soon).
|
||||
|
||||
*Note*: tests are currently tagged with their Web API version implicitly being 1.0.3, such as `@REQ-WA103-END3`,
|
||||
but the tests currently being run on the server for Web API 1.0.2 is the backwards-compatible subset of
|
||||
Web API 1.0.3 tests.
|
||||
*Note: the first time you run these tasks, they will take some time as the environment must be configured and code is being compiled from the contents of the source directory downloaded in the previous step.
|
||||
|
||||
### Web API Program Output
|
||||
|
||||
|
@ -502,31 +394,123 @@ Standard Resource Names requirement met!
|
|||
0m4.093s
|
||||
```
|
||||
|
||||
This shows configuration parameters, requests, and responses in a lightweight-manner.
|
||||
Detailed information will be added to a local `commander.log` file at runtime.
|
||||
|
||||
Detailed information will be added to a local `./commander.log` file at runtime.
|
||||
---
|
||||
## Automated RESO Data Dictionary Testing
|
||||
The Commander provides automated Data Dictionary 1.7 acceptance testing for RESO Certification. The DD 1.7 testing specification is available [here](https://docs.google.com/document/d/15DFf9kDX_mlGCJVOch2fztl8W5h-yd18N0_03Sb4HwM/edit?usp=sharing).
|
||||
|
||||
## Automated Data Dictionary Testing (In Development)
|
||||
Note that this feature is in development and not ready for use. Please contact josh@reso.org if you'd like to help
|
||||
with the development process.
|
||||
* [Data Dictionary RESOScript Template](#data-dictionary-resoscript-template)
|
||||
* [Data Dictionary Acceptance Tests](#data-dictionary-acceptance-tests)
|
||||
* [Gradle Tasks for Data Dictionary Certification](#gradle-tasks-for-data-dictionary-certification)
|
||||
* [Test Data Dictionary](#test-data-dictionary)
|
||||
* [Generate Data Dictionary Certification Report](#generate-data-dictionary-certification-report)
|
||||
|
||||
----
|
||||
To use the RESO Commander for Data Dictionary testing, you must have the JDK installed and a local copy of the Commander repository. See [RESO Certification](#reso-certification) before proceeding.
|
||||
|
||||
### Gradle Commands
|
||||
### Data Dictionary RESOScript Template
|
||||
To use the Commander for automated Data Dictionary testing, you need a RESOScript.
|
||||
|
||||
The list of available gradle commands can be shown by typing the following in the console:
|
||||
For Data Dictionary 1.7 Certification, use [this resoscript](sample-data-dictionary.1.7.0.resoscript) as a template.
|
||||
|
||||
### Data Dictionary Acceptance Tests
|
||||
RESO Data Dictionary Certification is driven off of the official Data Dictionary spreadsheet for each version of the dictionary, [currently DD 1.7](https://docs.google.com/spreadsheets/d/1SZ0b6T4_lz6ti6qB2Je7NSz_9iNOaV_v9dbfhPwWgXA/edit?usp=sharing).
|
||||
|
||||
Cucumber BDD acceptance tests are [automatically generated](#generating-reso-data-dictionary-acceptance-tests) from the [local copy of the approved spreadsheet](src/main/resources/RESODataDictionary-1.7.xlsx).
|
||||
|
||||
The generated Data Dictionary 1.7 Cucumber BDD tests are [located in this directory](https://github.com/RESOStandards/web-api-commander/tree/issue-37-data-dictionary-testing/src/main/java/org/reso/certification/features/data-dictionary/v1-7-0). See the [property.feature file](src/main/java/org/reso/certification/features/data-dictionary/v1-7-0/property.feature), for example, for the RESO Property Resource acceptance tests.
|
||||
|
||||
If you have any questions, please [send us an email](mailto:dev@reso.org).
|
||||
|
||||
### Gradle Tasks for Data Dictionary Certification
|
||||
There are predefined tasks for automated RESO Data Dictionary Certification using the Commander. These can be displayed using [Gradle Tasks](#gradle-tasks) as well.
|
||||
|
||||
* [Test Data Dictionary 1.7](#test-data-dictionary)
|
||||
* [Generate Data Dictionary 1.7 Certification Report](#generate-data-dictionary-certification-report)
|
||||
|
||||
_Note: the first time you run these tasks, they will take some time as the environment must be configured and code is being compiled from the contents of the source directory downloaded in the previous step._
|
||||
|
||||
#### Test Data Dictionary
|
||||
This task tests for Data Dictionary compliance and generates a raw report in a timestamped local directory.
|
||||
|
||||
There are two ways to run automated testing to check for RESO compliant Web API metadata:
|
||||
* using a local metadata file
|
||||
* using a RESOScript file to fetch metadata from a given server
|
||||
|
||||
While RESOScript files and the use of strict mode are required for RESO Certification. In both cases, metadata are validated and then processed for RESO compliance.
|
||||
|
||||
##### Data Dictionary Testing using Local Metadata
|
||||
The Commander allows for a local metadata file to be specified. Not only is this used for internal acceptance testing, but is useful for developers to troubleshoot metadata locally while working on compliance.
|
||||
|
||||
The Gradle task to validate local metadata can be run using the following command:
|
||||
|
||||
```
|
||||
$ gradle --help
|
||||
$ ./gradlew testDataDictionary_1_7 -DpathToMetadata=/path/to/RESODataDictionary-1.7.edmx
|
||||
```
|
||||
You may also pass a `-Dstrict=true` flag to see whether the given metadata file would pass Certification.
|
||||
|
||||
A raw report will be generated in a timestamped directory, and a `commander.log` will be generated during runtime.
|
||||
|
||||
##### Data Dictionary Testing using a Data Dictionary RESOScript
|
||||
During Certification, metadata are retrieved directly from an applicant's Web API server using either OAuth2 Bearer Tokens or Client Credentials. Either authentication option is currently available for RESO Certification, depending on configuration, and the applicant will provide working RESOScripts when they apply for certification.
|
||||
|
||||
An example Data Dictionary RESOScript template can be found [here](sample-data-dictionary.1.7.0.resoscript).
|
||||
|
||||
Once a RESOScript file has been created, it may be used with the following command:
|
||||
|
||||
```
|
||||
$ ./gradlew testDataDictionary_1_7 -DpathToRESOScript=/path/to/dd17.resoscript -DshowResponses=true
|
||||
```
|
||||
You may also pass a `-Dstrict=true` flag to see whether the given metadata file would pass Certification.
|
||||
|
||||
A raw report will be generated in a timestamped directory, and a `commander.log` will be generated during runtime.
|
||||
|
||||
#### Generate Data Dictionary Certification Report
|
||||
This task tests for Data Dictionary compliance and generates both a raw report and a RESO Certification report in a timestamped directory.
|
||||
|
||||
Similar to the [Test Data Dictionary 1.7](#test-data-dictionary-1.7) task, the report generator can be run for both local metadata or used with a RESOScript.
|
||||
|
||||
For the purposes of Certification, a Certification Report MUST be generated using a RESOScript using strict mode. But it's useful to be able to produce certification reports with any local files as well.
|
||||
|
||||
##### Certification Reports using Local Metadata
|
||||
A RESO Certification report can be generated for local metadata by using the following commmand:
|
||||
```
|
||||
$ ./gradlew generateCertificationReport_DD_1_7 -DpathToMetadata=src/main/resources/RESODataDictionary-1.7.edmx -Dminimal=true -Dstrict=true --continue
|
||||
```
|
||||
Note the use of the `--continue` argument.
|
||||
|
||||
You may remove the `-Dstrict=true` flag, but it will be required for RESO Certification.
|
||||
|
||||
A "pretty" Certification report will be generated in a timestamped directory in addition to the normal raw report.
|
||||
|
||||
##### Certification Reports using a Data Dictionary RESOScript
|
||||
A RESO Certification report can be generated using a RESOScript by using the following command:
|
||||
```
|
||||
$ ./gradlew generateCertificationReport_DD_1_7 -DpathToRESOScript=/path/to/dd1.7.resoscript -Dminimal=true -Dstrict=true --continue
|
||||
```
|
||||
You may remove the `-Dstrict=true` flag, but it will be required for RESO Certification.
|
||||
|
||||
A "pretty" Certification report will be generated in a timestamped directory in addition to the normal raw report.
|
||||
|
||||
### Data Dictionary Testing Output
|
||||
To see examples of Data Dictionary testing output, you may use the `./gradlew testDataDictionaryReferenceMetadata_1_7` command to run the Data Dictionary acceptance tests on the RESO reference metadata.
|
||||
|
||||
There is additional documentation about how Data Dictionary testing works, including sample output, in the [RESO Data Dictionary 1.7 Testing Specification](https://docs.google.com/document/d/15DFf9kDX_mlGCJVOch2fztl8W5h-yd18N0_03Sb4HwM/edit#heading=h.rib4osorsdcx).
|
||||
|
||||
## Advanced feature: Tag Filtering
|
||||
You may filter by tags in any of the Web API or Data Dictionary tests. These are the items in the Cucumber .feature files prefixed by an `@` symbol. Expressions may also be used with tags. This README doen't cover how to use tags, but the Commander supports them. For more information, see the [Cucumber Documentation](https://cucumber.io/docs/cucumber/api/#tags).
|
||||
|
||||
#### Examples
|
||||
|
||||
**Run Web API Core Metadata Tests Only**
|
||||
```
|
||||
$ gradle testWebAPIServerCore_1_0_2 -DpathToRESOScript=/path/to/your.web-api-server.core.1.0.2.resoscript -Dcucumber.filter.tags="@metadata"
|
||||
```
|
||||
|
||||
These commands should not be necessary for the normal use of the Commander. There are a handful that are, however,
|
||||
|
||||
* `--continue Continue task execution after a task failure.`
|
||||
* `-S, --full-stacktrace Print out the full (very verbose) stacktrace for all exceptions.`
|
||||
* `-s, --stacktrace Print out the stacktrace for all exceptions.`
|
||||
* `-t, --continuous Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change. [incubating]`
|
||||
|
||||
**Run Data Dictionary Tests on IDX Fields Only**
|
||||
```
|
||||
$ ./gradlew testDataDictionary_1_7 -DpathToRESOScript=/path/to/your/dd1.7.resoscript -DshowResponses=true -Dcucumber.filter.tags="@IDX"
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
|
@ -557,9 +541,6 @@ You may also run the tests in a Docker container locally by issuing one of the f
|
|||
Docker must be running on your local machine.
|
||||
|
||||
#### MacOS or Linux All-In-One Commands
|
||||
|
||||
|
||||
##### Core
|
||||
```
|
||||
cd ~; \
|
||||
rm -rf commander-tmp/; \
|
||||
|
@ -575,13 +556,14 @@ which is also where you will end up after runtime.
|
|||
|
||||
|
||||
#### Windows All-In-One WIP
|
||||
|
||||
##### Core
|
||||
|
||||
```
|
||||
cd C:\;mkdir commander-tmp;cd commander-tmp;git clone https://github.com/RESOStandards/web-api-commander.git;cd web-api-commander; docker run --rm -u gradle -v C:\current\path\web-api-commander:/home/gradle/project -v C:\path\to\your\resoscripts:/home/gradle/project/resoscripts -w /home/gradle/project gradle gradle testWebAPIServer_1_0_2_Core -DpathToRESOScript=/home/gradle/project/resoscripts/your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
|
||||
```
|
||||
|
||||
---
|
||||
## Using the Commander as a Web API Client Library
|
||||
Java or Scala developers may also use the Commander as a client library, which uses the Apache Olingo library under the hood but adds things like OAuth2 support and data retrieval, validation, and serialization methods. To do so, include the [standalone Web API Commander Jar](build/libs/web-api-commander.jar) in your projects. Feel free to open issues or feature requests in the [Commander GitHub project](https://github.com/RESOStandards/web-api-commander/issues).
|
||||
|
||||
---
|
||||
## Logging
|
||||
|
||||
|
@ -593,11 +575,7 @@ Gradle may be debugged as well, and additional gradle commands such as turning o
|
|||
|
||||
---
|
||||
|
||||
Please contact [josh@reso.org](mailto:josh@reso.org) with any questions, bug reports, or feature requests.
|
||||
## Support
|
||||
Please contact [Josh](mailto:josh@reso.org) with any questions, bug reports, or feature requests. Contributions to code or documentation are welcome.
|
||||
|
||||
## Coming Soon
|
||||
* Fully-automated Data Dictionary certification (in-progress)
|
||||
* Support for authentication options in addition to Bearer tokens (Client Credentials in beta, please email for more info).
|
||||
* Parallel fetch for replication
|
||||
* Job Scheduling
|
||||
* Excel export
|
||||
You may also [open a ticket](https://github.com/RESOStandards/web-api-commander/issues).
|
||||
|
|
File diff suppressed because it is too large
Load Diff
123
build.gradle
123
build.gradle
|
@ -1,3 +1,6 @@
|
|||
import java.text.DateFormat
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
plugins {
|
||||
// Apply the java plugin to add support for Java
|
||||
id 'java'
|
||||
|
@ -20,6 +23,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compile 'com.google.guava:guava:28.2-jre'
|
||||
compile 'com.google.inject:guice:4.0'
|
||||
|
||||
compile 'commons-cli:commons-cli:1.4'
|
||||
|
||||
|
@ -32,16 +36,25 @@ dependencies {
|
|||
compile 'org.apache.olingo:odata-commons-core:4.7.1'
|
||||
compile 'org.apache.olingo:odata-client-core:4.7.1'
|
||||
|
||||
compile 'org.apache.poi:poi:3.9'
|
||||
compile 'org.apache.poi:poi-ooxml:3.9'
|
||||
|
||||
|
||||
compile 'io.rest-assured:rest-assured:4.2.0'
|
||||
compile 'io.rest-assured:json-path:4.2.0'
|
||||
compile 'io.rest-assured:json-schema-validator:4.2.0'
|
||||
|
||||
compile 'io.cucumber:cucumber-java8:5.4.0'
|
||||
compile 'io.cucumber:cucumber-java:5.4.0'
|
||||
compile 'io.cucumber:cucumber-junit:5.4.0'
|
||||
compile 'io.cucumber:cucumber-guice:5.4.0'
|
||||
compile 'io.cucumber:cucumber-core:5.4.0'
|
||||
|
||||
compile 'net.masterthought:cucumber-reporting:5.1.1'
|
||||
|
||||
compile 'com.networknt:json-schema-validator:1.0.35'
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
compile 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
implementation 'org.mockito:mockito-core:3.3.3'
|
||||
}
|
||||
|
@ -74,6 +87,11 @@ tasks.withType(JavaCompile) {
|
|||
|
||||
// task for Web API Server 1.0.2 Core Testing
|
||||
task testWebApiServer_1_0_2_Core() {
|
||||
group = 'RESO Certification'
|
||||
description = 'Runs Web API Core 1.0.2 Automated Acceptance Tests.' +
|
||||
'\n Example: ' +
|
||||
'\n $ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/web-api-core-1.0.2.resoscript -DshowResponses=true\n'
|
||||
|
||||
dependsOn jar
|
||||
doLast {
|
||||
javaexec {
|
||||
|
@ -96,13 +114,112 @@ task testWebApiServer_1_0_2_Core() {
|
|||
}
|
||||
}
|
||||
|
||||
//used for internal Commander testing
|
||||
test {
|
||||
dependsOn assemble, compileTestJava
|
||||
String pathToMetadata = null,
|
||||
pathToRESOScript = null,
|
||||
certFileName = null,
|
||||
certOutputDir = null,
|
||||
certJsonPath = null
|
||||
|
||||
// task for Data Dictionary 1.7
|
||||
task testDataDictionary_1_7() {
|
||||
group = 'RESO Certification'
|
||||
description = 'Runs Data Dictionary 1.7 Automated Acceptance Tests and generates a "raw" report.' +
|
||||
'\n RESOScript Example:' +
|
||||
'\n ./gradlew testDataDictionary_1_7 -DpathToRESOScript=/path/to/dd17.resoscript -DshowResponses=true -Dcucumber.filter.tags=""' +
|
||||
'\n Metadata File Example:' +
|
||||
'\n ./gradlew testDataDictionary_1_7 -DpathToMetadata=/path/to/RESODataDictionary-1.7.edmx -Dcucumber.filter.tags=""' +
|
||||
'\n To enable strict mode, pass -Dstrict=true. All applicants MUST pass strict mode tests to be certified.\n'
|
||||
|
||||
dependsOn jar
|
||||
doLast {
|
||||
javaexec {
|
||||
main = 'io.cucumber.core.cli.Main'
|
||||
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
||||
systemProperties = System.getProperties()
|
||||
|
||||
pathToMetadata = System.getProperty('pathToMetadata', null)
|
||||
pathToRESOScript = System.getProperty('pathToRESOScript', null)
|
||||
|
||||
if (pathToMetadata != null) {
|
||||
certFileName = pathToMetadata
|
||||
.substring(Math.max(pathToMetadata.lastIndexOf(File.separator)+1, 0), pathToMetadata.lastIndexOf('.'))
|
||||
} else if (pathToRESOScript != null) {
|
||||
certFileName = pathToRESOScript
|
||||
.substring(Math.max(pathToRESOScript.lastIndexOf(File.separator)+1, 0), pathToRESOScript.lastIndexOf('.'))
|
||||
}
|
||||
|
||||
DateFormat df = new SimpleDateFormat("yyyyMMddHHMMssS")
|
||||
certOutputDir = 'DD1.7-results' + (certFileName != null ? '-' + certFileName : '') + '-' + df.format(new Date())
|
||||
certJsonPath = certOutputDir + '/data-dictionary-1.7.json'
|
||||
|
||||
args = [
|
||||
'--strict',
|
||||
'--plugin',
|
||||
'pretty',
|
||||
'--plugin',
|
||||
'json:' + certJsonPath,
|
||||
'--plugin',
|
||||
'html:' + certOutputDir + '/data-dictionary-1.7.html',
|
||||
'--glue',
|
||||
'org.reso.certification.stepdefs#DataDictionary',
|
||||
'src/main/java/org/reso/certification/features/data-dictionary/v1-7-0',
|
||||
'--tags',
|
||||
(systemProperties.get('cucumber.filter.tags', '').toString().trim().length() > 0
|
||||
? systemProperties.get('cucumber.filter.tags') : '')
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task generateCertificationReport_DD_1_7() {
|
||||
group = 'RESO Certification'
|
||||
description = 'Runs Data Dictionary 1.7 tests and creates a certification report' +
|
||||
'\n RESOScript Example:' +
|
||||
'\n ./gradlew generateCertificationReport_DD_1_7 -DpathToRESOScript=/path/to/dd17.resoscript -Dminimal=true -Dstrict=true' +
|
||||
'\n Metadata File Example:' +
|
||||
'\n ./gradlew generateCertificationReport_DD_1_7 -DpathToMetadata=/path/to/RESODataDictionary-1.7.edmx -Dminimal=true -Dstrict=true' +
|
||||
'\n To enable strict mode, pass -Dstrict=true. All applicants MUST pass strict mode tests to be certified.\n'
|
||||
|
||||
dependsOn testDataDictionary_1_7
|
||||
doLast {
|
||||
javaexec {
|
||||
System.setProperty('pathToJsonResults', certJsonPath)
|
||||
System.setProperty('reportDescription', 'RESO Data Dictionary 1.7 Certification Report')
|
||||
systemProperties = System.getProperties()
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
main = 'org.reso.certification.reporting.CertificationReportGenerator'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task testDataDictionaryReferenceMetadata_1_7() {
|
||||
group = 'RESO Certification'
|
||||
description = 'Runs Data Dictionary tests against reference metadata\n'
|
||||
|
||||
doLast {
|
||||
javaexec {
|
||||
main = "io.cucumber.core.cli.Main"
|
||||
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
||||
System.setProperty('pathToMetadata', 'src/main/resources/RESODataDictionary-1.7.edmx')
|
||||
systemProperties = System.getProperties()
|
||||
args = [
|
||||
'--strict',
|
||||
'--plugin',
|
||||
'pretty',
|
||||
'--glue',
|
||||
'org.reso.certification.stepdefs#DataDictionary',
|
||||
'src/main/java/org/reso/certification/features/data-dictionary/v1-7-0'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//used for internal Commander Web API acceptance testing
|
||||
test {
|
||||
dependsOn assemble, compileTestJava, testDataDictionaryReferenceMetadata_1_7
|
||||
doLast {
|
||||
javaexec {
|
||||
main = "io.cucumber.core.cli.Main"
|
||||
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
||||
args = ['--strict',
|
||||
'--plugin',
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
examples/*.zip
|
||||
node_modules
|
||||
temp
|
|
@ -0,0 +1,20 @@
|
|||
<div>
|
||||
<h2>Repository Contributions, Participation, and Public Access</h2>
|
||||
|
||||
<p><b>Who may Contribute?</b> Contributors to <a href="https://github.com/oasis-tcs/odata-openapi/">this repository</a> are expected to be <a href="https://www.oasis-open.org/policies-guidelines/tc-process#dMember">Members</a> of the
|
||||
<a href="https://www.oasis-open.org/committees/odata/">OASIS Open Data Protocol (OData) Technical Committee</a>, for any
|
||||
substantive contributions. Anyone wishing to <a href="https://www.oasis-open.org/org/faq#committee-participation">participate</a>
|
||||
in the TC's technical activity is invited to <a href="https://www.oasis-open.org/committees/join">join</a> as a TC Member.
|
||||
<i>Member</i> in this context means any TC role or office other than OASIS TC Observer, per
|
||||
<a href="https://www.oasis-open.org/policies-guidelines/tc-process#membership">TC Process</a>
|
||||
(Member, Voting Member, Persistent Non-Voting Member; Chair, Secretary...)</p>
|
||||
|
||||
<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-openapi/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-openapi/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>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-openapi/blob/master/README.md">README</a> for general description of this repository, and the <a href="https://github.com/oasis-tcs/odata-openapi/blob/master/LICENSE.md">LICENSE</a> file for licensing.</p>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
<div>
|
||||
<h2>License Terms</h2>
|
||||
|
||||
<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-openapi/blob/master/README.md">README</a> file, and guidelines for contribution/participation are given in the <a href="https://github.com/oasis-tcs/odata-openapi/blob/master/CONTRIBUTING.md">CONTRIBUTING</a> file.</p>
|
||||
</div>
|
|
@ -0,0 +1,54 @@
|
|||
<div>
|
||||
<h2>README</h2>
|
||||
|
||||
<p>Members of the <a href="https://www.oasis-open.org/committees/odata/">OASIS Open Data Protocol (OData) Technical Committee</a> create and manage technical content in this TC GitHub repository ( <a href="https://github.com/oasis-tcs/odata-openapi">https://github.com/oasis-tcs/odata-openapi</a> ) as part of the TC's chartered work (<i>i.e.</i>, the program of work and deliverables described in its <a href="https://www.oasis-open.org/committees/odata/charter.php">charter</a>).</p>
|
||||
|
||||
<p>OASIS TC GitHub repositories, as described in <a href="https://www.oasis-open.org/resources/tcadmin/github-repositories-for-oasis-tc-members-chartered-work">GitHub Repositories for OASIS TC Members' Chartered Work</a>, are governed by the OASIS <a href="https://www.oasis-open.org/policies-guidelines/tc-process">TC Process</a>, <a href="https://www.oasis-open.org/policies-guidelines/ipr">IPR Policy</a>, and other policies, similar to TC Wikis, TC JIRA issues tracking instances, TC SVN/Subversion repositories, etc. While they make use of public GitHub repositories, these TC GitHub repositories are distinct from <a href="https://www.oasis-open.org/resources/open-repositories">OASIS Open Repositories</a>, which are used for development of open source <a href="https://www.oasis-open.org/resources/open-repositories/licenses">licensed</a> content.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The purpose of this repository is to support development of tools for producing <a href="https://github.com/OAI/OpenAPI-Specification">OpenAPI</a> descriptions for OData services.</p>
|
||||
<p>Planned work items include:
|
||||
<ul>
|
||||
<li>convert OData CSDL JSON or OData CSDL XML to OpenAPI JSON</li>
|
||||
<li>example XML files</li>
|
||||
<li>example openapi.json files</li>
|
||||
<li>example files for the live odata.org services</li>
|
||||
</ul></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3>Contributions</h3>
|
||||
<p>As stated in this repository's <a href="https://github.com/oasis-tcs/odata-openapi/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>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3>Licensing</h3>
|
||||
<p>Please see the <a href="https://github.com/oasis-tcs/odata-openapi/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-openapi/blob/master/LICENSE.md">LICENSE</a> file.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h3>Further Description of this Repository</h3>
|
||||
|
||||
The OData TC has published the [OData to OpenAPI Mapping Version 1.0](http://docs.oasis-open.org/odata/odata-openapi/v1.0/odata-openapi-v1.0.html), a recommendation on how to create OpenAPI descriptions for OData services. This project contains two proof-of-concept implementations of that mapping, [one using JavaScript](lib), and [one using XSLT](tools).
|
||||
|
||||
The [`examples` folder](examples) contains [OpenAPI 3.0.2](https://github.com/OAI/OpenAPI-Specification) descriptions that have been created from the XML `$metadata` documents of live and example OData services with these proof-of-concept implementations.
|
||||
|
||||
The entity-relationship diagrams visualizing the resource models of each service are generated on-the-fly with [yUML](http://yuml.me/).
|
||||
|
||||
OpenAPI descriptions for live example OData services at [www.odata.org](http://www.odata.org/)
|
||||
- [TripPin (read/write)](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/TripPin.openapi3.json)
|
||||
- [Simple read/write service](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/example.openapi3.json)
|
||||
- [Northwind (read)](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/Northwind.openapi3.json)
|
||||
|
||||
OpenAPI descriptions for OData services that reference each other (cross-service references)
|
||||
- [People](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/People.openapi3.json)
|
||||
- [Products](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/Products.openapi3.json)
|
||||
|
||||
<div>
|
||||
<h3>Contact</h3>
|
||||
<p>Please send questions or comments about <a href="https://www.oasis-open.org/resources/tcadmin/github-repositories-for-oasis-tc-members-chartered-work">OASIS TC GitHub repositories</a> to the OASIS <a href="mailto:tc-admin@oasis-open.org">TC Administrator</a>. For questions about content in this repository, please contact the TC Chair or Co-Chairs as listed on the the OData TC's <a href="https://www.oasis-open.org/committees/odata/">home page</a>.</p>
|
||||
</div>
|
|
@ -0,0 +1,90 @@
|
|||
# Supported Annotations
|
||||
|
||||
The OData to OpenAPI Mapping can be fine-tuned via annotations in the CSDL (`$metadata`) XML documents.
|
||||
|
||||
See [Frequently Asked Questions](FAQ.md) for examples on how to use these annotations.
|
||||
|
||||
|
||||
## [Core](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md)
|
||||
|
||||
Term | Annotation Target | OpenAPI field
|
||||
-----|-------------------|--------------
|
||||
`Computed` | Property | omit from Create and Update structures
|
||||
`DefaultNamespace` | Schema | path templates for actions and functions without namespace prefix
|
||||
`Description` | Action, ActionImport, Function, FunctionImport | `summary` of Operation Object
|
||||
`Description` | EntitySet, Singleton | `description` of Tag Object
|
||||
`Description` | EntityType | `description` of Request Body Object
|
||||
`Description` | ComplexType, EntityType, EnumerationType, Parameter, Property, TypeDefinition | `title` of Schema Object
|
||||
`Description` | Schema, EntityContainer | `info.title`
|
||||
`Example` | Property | `example` of Schema Object
|
||||
`Immutable` | Property | omit from Update structure
|
||||
`LongDescription` | Action, ActionImport, Function, FunctionImport | `description` of Operation Object
|
||||
`LongDescription` | ComplexType, EntityType, EnumerationType, Parameter, Property, TypeDefinition | `description` of Schema Object
|
||||
`LongDescription` | Schema, EntityContainer | `info.description`
|
||||
`Permissions:Read` | Property | omit read-only properties from Create and Update structures
|
||||
`SchemaVersion` | Schema | `info.version`
|
||||
|
||||
|
||||
## [Capabilities](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md)
|
||||
|
||||
Term | Annotation Target | OpenAPI field
|
||||
-----|-------------------|--------------
|
||||
`CountRestrictions`<br> `/Countable` | EntitySet | `$count` system query option for `GET` operation
|
||||
`DeleteRestrictions`<br> `/Deletable` | EntitySet, Singleton | `DELETE` operation for deleting an existing entity
|
||||
 `/Description` | EntitySet, Singleton | `summary` of Operation Object
|
||||
 `/LongDescription` | EntitySet, Singleton | `description` of Operation Object
|
||||
`ExpandRestrictions`<br> `/Expandable` | EntitySet, Singleton | `$expand` system query option for `GET` operations
|
||||
`FilterRestrictions`<br> `/Filterable` | EntitySet | `$filter` system query option for `GET` operation
|
||||
 `/RequiredProperties` | EntitySet | required properties in `$filter` system query option for `GET` operation (parameter description only)
|
||||
 `/RequiresFilter` | EntitySet | `$filter` system query option for `GET` operation is `required`
|
||||
`IndexableByKey` | EntitySet | `GET`, `PATCH`, and `DELETE` operations for a single entity within an entity set
|
||||
`InsertRestrictions`<br> `/Insertable` | EntitySet | `POST` operation for inserting a new entity
|
||||
 `/Description` | EntitySet | `summary` of Operation Object
|
||||
 `/LongDescription` | EntitySet | `description` of Operation Object
|
||||
`KeyAsSegmentSupported` | EntityContainer | `paths` URL templates use key-as-segment style instead of parenthesis style
|
||||
`NavigationRestrictions`<br> `/RestrictedProperties` | EntitySet, Singleton | operations via a navigation path
|
||||
  `/DeleteRestrictions/...` | EntitySet, Singleton | `DELETE` operation for deleting a contained entity via a navigation path
|
||||
  `/FilterRestrictions/...` | EntitySet, Singleton | `$filter` system query option for reading related entities via a navigation path
|
||||
  `/InsertRestrictions/...` | EntitySet, Singleton | `POST` operation for inserting a new related entity via a navigation path
|
||||
  `/ReadByKeyRestrictions/...` | EntitySet, Singleton | `GET` operation for reading a contained entity by key via a navigation path
|
||||
  `/ReadRestrictions/...` | EntitySet, Singleton | `GET` operation for reading related entities via a navigation path
|
||||
  `/SearchRestrictions/...` | EntitySet, Singleton | `$search` system query option for reading related entities via a navigation path
|
||||
  `/SelectSupport/...` | EntitySet, Singleton | `$select` system query option for reading related entities via a navigation path
|
||||
  `/SkipSupported` | EntitySet, Singleton | `$skip` system query option for reading contained entities via a navigation path
|
||||
  `/SortRestrictions/...` | EntitySet, Singleton | `$orderby` system query option for reading related entities via a navigation path
|
||||
  `/TopSupported` | EntitySet, Singleton | `$top` system query option for reading contained entities via a navigation path
|
||||
  `/UpdateRestrictions/...` | EntitySet, Singleton | `PATCH` operation for modifying a contained entity via a navigation path
|
||||
`ReadByKeyRestrictions`<br> `/Readable` | EntitySet | `GET` operation for reading a single entity by key
|
||||
 `/Description` | EntitySet | `summary` of Operation Object
|
||||
 `/LongDescription` | EntitySet | `description` of Operation Object
|
||||
`ReadRestrictions`<br> `/Readable` | EntitySet, Singleton | `GET` operation for reading an entity set or singleton
|
||||
 `/Description` | EntitySet, Singleton | `summary` of Operation Object
|
||||
 `/LongDescription` | EntitySet, Singleton | `description` of Operation Object
|
||||
`SearchRestrictions`<br> `/Searchable` | EntitySet | `$search` system query option for `GET` operation
|
||||
`SelectSupport`<br> `/Supported` | EntitySet, Singleton | `$select` system query option for `GET` operation
|
||||
`SkipSupported` | EntitySet | `$skip` system query option for `GET` operation
|
||||
`SortRestrictions`<br> `/NonSortableProperties` | EntitySet | properties not listed in `$orderby` system query option for `GET` operation
|
||||
 `/Sortable` | EntitySet | `$orderby` system query option for `GET` operation
|
||||
`TopSupported` | EntitySet | `$top` system query option for `GET` operation
|
||||
`UpdateRestrictions`<br> `/Updatable` | EntitySet, Singleton | `PATCH` operation for modifying an existing entity
|
||||
 `/Description` | EntitySet, Singleton | `summary` of Operation Object
|
||||
 `/LongDescription` | EntitySet, Singleton | `description` of Operation Object
|
||||
|
||||
|
||||
## [Validation](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Validation.V1.md)
|
||||
|
||||
Term | Annotation Target | OpenAPI field
|
||||
-----|-------------------|--------------
|
||||
`AllowedValues` | Property | `enum` of Schema Object - list of allowed (string) values
|
||||
`Exclusive` | Property | `exclusiveMinimum`/`exclusiveMaximum` of Schema Object
|
||||
`Maximum` | Property | `maximum` of Schema Object
|
||||
`Minimum` | Property | `minimum` of Schema Object
|
||||
`Pattern` | Property | `pattern` of Schema Object
|
||||
|
||||
|
||||
## [Authorization](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Authorization.V1.md)
|
||||
|
||||
Term | Annotation Target | OpenAPI field
|
||||
-----|-------------------|--------------
|
||||
`Authorizations` | EntityContainer | `securitySchemes` of Components Object / `securityDefinitions` of Swagger Object
|
||||
`SecuritySchemes` | EntityContainer | `security` of OpenAPI / Swagger Object
|
|
@ -0,0 +1,77 @@
|
|||
# Frequently Asked Questions
|
||||
|
||||
Examples for typical questions on how to fine-tune the generated OpenAPI descriptions.
|
||||
|
||||
The examples here do not cover the full list of [supported annotions](Annotations.md).
|
||||
|
||||
## How to suppress GET (list and by-key) on an entity set?
|
||||
|
||||
To suppress both types of GET requests to an entity set, annotate it with
|
||||
|
||||
```xml
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
```
|
||||
|
||||
## How to suppress GET (list) on an entity set?
|
||||
|
||||
To suppress only GET list requests to an entity set and still allow GET by-key, annotate it with
|
||||
|
||||
```xml
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
```
|
||||
|
||||
## How to suppress GET (by-key) on an entity set?
|
||||
|
||||
To suppress only GET by-key requests to an entity set and still allow GET list, annotate it with
|
||||
|
||||
```xml
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
```
|
||||
|
||||
## How to suppress GET and POST along all navigation properties?
|
||||
|
||||
```xml
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
```
|
||||
|
||||
## How to suppress GET and POST along a specific navigation property?
|
||||
|
||||
```xml
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Foo" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
```
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,272 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="http://tinyurl.com/Org-OData-Core">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OData.Demo" Alias="Model">
|
||||
<EntityContainer Name="Container">
|
||||
<EntitySet Name="Customers" EntityType="Model.Customer">
|
||||
<NavigationPropertyBinding Target="Orders" Path="Orders" />
|
||||
<NavigationPropertyBinding Target="Sales" Path="Sales" />
|
||||
<NavigationPropertyBinding Target="Countries" Path="Address/Country" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="Model.Supplier">
|
||||
<NavigationPropertyBinding Target="Products" Path="Products" />
|
||||
<NavigationPropertyBinding Target="Employees" Path="Model.PreferredSupplier/AccountRepresentative" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Products" EntityType="Model.Product">
|
||||
<NavigationPropertyBinding Target="Categories" Path="Category" />
|
||||
<NavigationPropertyBinding Target="Suppliers" Path="Supplier" />
|
||||
<NavigationPropertyBinding Target="OrderItems" Path="OrderItems" />
|
||||
<NavigationPropertyBinding Target="Sales" Path="Sales" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Orders" EntityType="Model.Order">
|
||||
<NavigationPropertyBinding Target="OrderItems" Path="Items" />
|
||||
<NavigationPropertyBinding Target="Customers" Path="Customer" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Categories" EntityType="Model.Category">
|
||||
<NavigationPropertyBinding Target="Products" Path="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="OrderItems" EntityType="Model.OrderItem">
|
||||
<NavigationPropertyBinding Target="Orders" Path="Order" />
|
||||
<NavigationPropertyBinding Target="Products" Path="Product" />
|
||||
<NavigationPropertyBinding Target="Currencies" Path="Currency" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Sales" EntityType="Model.Sales">
|
||||
<NavigationPropertyBinding Target="Time" Path="Time" />
|
||||
<NavigationPropertyBinding Target="Currencies" Path="Currency" />
|
||||
<NavigationPropertyBinding Target="Customers" Path="Customer" />
|
||||
<NavigationPropertyBinding Target="SalesOrganizations" Path="SalesOrganization" />
|
||||
<NavigationPropertyBinding Target="Products" Path="Product" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Employees" EntityType="Model.Employee">
|
||||
<NavigationPropertyBinding Target="Employees" Path="Model.Manager/Employees" />
|
||||
<NavigationPropertyBinding Target="Employees" Path="Manager" />
|
||||
<NavigationPropertyBinding Target="LeaveRequests" Path="Model.Manager/Inbox" />
|
||||
<NavigationPropertyBinding Target="LeaveRequests" Path="LeaveRequests" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="LeaveRequests" EntityType="Model.LeaveRequest">
|
||||
<NavigationPropertyBinding Target="Employees" Path="Manager" />
|
||||
<NavigationPropertyBinding Target="Employees" Path="Employee" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Countries" EntityType="Model.Country" />
|
||||
<EntitySet Name="Time" EntityType="Model.Time">
|
||||
<NavigationPropertyBinding Target="Sales" Path="Sales" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="SalesOrganizations" EntityType="Model.SalesOrganization">
|
||||
<NavigationPropertyBinding Target="Sales" Path="Sales" />
|
||||
<NavigationPropertyBinding Target="SalesOrganizations" Path="Superordinate" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Currencies" EntityType="Model.Currency">
|
||||
<NavigationPropertyBinding Target="Sales" Path="Sales" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Cities" EntityType="Model.City" />
|
||||
</EntityContainer>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(Model.Order)" Partner="Customer" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" />
|
||||
<Property Name="BirthDate" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="CountryName" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Core.Description">
|
||||
<String>This is weird, given that we have a Country entity type</String>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<NavigationProperty Name="Sales" Type="Collection(Model.Sales)" Partner="Customer" />
|
||||
<Property Name="ContactName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Fax" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Address" Type="Model.Address" Nullable="false" />
|
||||
<Property Name="EmailAddresses" Type="Collection(Edm.String)" />
|
||||
<Property Name="Phone" Type="Model.PhoneNumber" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Type="Collection(Model.Product)" Partner="Supplier" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="EmailAddresses" Type="Collection(Edm.String)" />
|
||||
<Property Name="Addresses" Type="Collection(Model.Address)" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Type="Model.Category" Nullable="false" Partner="Products" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Supplier" Type="Model.Supplier" Nullable="false" Partner="Products" />
|
||||
<Property Name="Description" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Thumbnail" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Sizes" Type="Collection(Edm.String)" />
|
||||
<Property Name="Rating" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="OrderItems" Type="Collection(Model.OrderItem)" Partner="Product" />
|
||||
<Property Name="ReleaseDate" Type="Edm.Date" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.Date" />
|
||||
<Property Name="LifeTime" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Color" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="TaxRate" Type="Edm.Decimal" Precision="10" Scale="6" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(Model.Sales)" Partner="Product" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Items" Type="Collection(Model.OrderItem)" Partner="Order" />
|
||||
<Property Name="Completed" Type="Edm.Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="Customer" Type="Model.Customer" Nullable="false" Partner="Orders" />
|
||||
<Property Name="ShippingAddress" Type="Model.Address" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="VipCustomer" BaseType="Model.Customer" />
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Amount" Type="Edm.Decimal" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Type="Collection(Model.Product)" Partner="Category" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Thumbnail" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="OrderItem">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ItemID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ItemID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Order" Type="Model.Order" Nullable="false" Partner="Items">
|
||||
<OnDelete Action="Cascade" />
|
||||
<ReferentialConstraint Property="OrderID" ReferencedProperty="ID" />
|
||||
</NavigationProperty>
|
||||
<Property Name="Size" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Decimal" Nullable="false" />
|
||||
<NavigationProperty Name="Product" Type="Model.Product" Nullable="false" Partner="OrderItems" />
|
||||
<NavigationProperty Name="Currency" Type="Model.Currency" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Amount" Type="Edm.Decimal" Nullable="false" />
|
||||
<NavigationProperty Name="Time" Type="Model.Time" Nullable="false" Partner="Sales" />
|
||||
<NavigationProperty Name="Currency" Type="Model.Currency" Nullable="false" Partner="Sales" />
|
||||
<NavigationProperty Name="Customer" Type="Model.Customer" Nullable="false" Partner="Sales" />
|
||||
<NavigationProperty Name="SalesOrganization" Type="Model.SalesOrganization" Nullable="false" Partner="Sales" />
|
||||
<NavigationProperty Name="Product" Type="Model.Product" Nullable="false" Partner="Sales" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Title" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Manager" Type="Model.Manager" Partner="Employees" />
|
||||
<NavigationProperty Name="LeaveRequests" Type="Collection(Model.LeaveRequest)" Partner="Employee" />
|
||||
</EntityType>
|
||||
<EntityType Name="LeaveRequest">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Manager" Type="Model.Manager" Nullable="false" Partner="Inbox" />
|
||||
<NavigationProperty Name="Employee" Type="Model.Employee" Nullable="false" Partner="LeaveRequests" />
|
||||
</EntityType>
|
||||
<Action Name="Approval" IsBound="true">
|
||||
<Parameter Name="LeaveRequest" Type="Model.LeaveRequest" />
|
||||
</Action>
|
||||
<Action Name="Rejection" IsBound="true">
|
||||
<Parameter Name="LeaveRequest" Type="Model.LeaveRequest" />
|
||||
<Parameter Name="Reason" Type="Edm.String" />
|
||||
</Action>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Country" Type="Model.Country" Nullable="false" />
|
||||
<NavigationProperty Name="City" Type="Model.City" Nullable="false" />
|
||||
<Property Name="Region" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="PostalCode" Type="Edm.String" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="AddressWithLocation" BaseType="Model.Address">
|
||||
<Property Name="Location" Type="Edm.GeographyPoint" Nullable="false" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Country">
|
||||
<Key>
|
||||
<PropertyRef Name="Code" />
|
||||
</Key>
|
||||
<Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="2" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Continent" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PreferredSupplier" BaseType="Model.Supplier">
|
||||
<NavigationProperty Name="AccountRepresentative" Type="Model.Employee" Nullable="true">
|
||||
<ReferentialConstraint Property="EmployeeID" ReferencedProperty="ID">
|
||||
<Annotation Term="Core.Description" String="The key account manager" />
|
||||
</ReferentialConstraint>
|
||||
</NavigationProperty>
|
||||
<Property Name="EmployeeID" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<EnumType Name="Pattern" IsFlags="true">
|
||||
<Member Name="Yellow" Value="1" />
|
||||
<Member Name="Solid" Value="2" />
|
||||
</EnumType>
|
||||
<EntityType Name="Manager" BaseType="Model.Employee">
|
||||
<NavigationProperty Name="Employees" Type="Collection(Model.Employee)" Partner="Manager" />
|
||||
<NavigationProperty Name="Inbox" Type="Collection(Model.LeaveRequest)" Partner="Manager" />
|
||||
</EntityType>
|
||||
<EntityType Name="Time">
|
||||
<Key>
|
||||
<PropertyRef Name="Date" />
|
||||
</Key>
|
||||
<Property Name="Date" Type="Edm.Date" Nullable="false" />
|
||||
<Property Name="Year" Type="Edm.String" Nullable="false" MaxLength="4" />
|
||||
<Property Name="Quarter" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Month" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(Model.Sales)" Partner="Time" />
|
||||
</EntityType>
|
||||
<EntityType Name="SalesOrganization">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(Model.Sales)" Partner="SalesOrganization" />
|
||||
<NavigationProperty Name="Superordinate" Type="Model.SalesOrganization" />
|
||||
</EntityType>
|
||||
<EntityType Name="Currency">
|
||||
<Key>
|
||||
<PropertyRef Name="Code" />
|
||||
</Key>
|
||||
<Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="3" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(Model.Sales)" Partner="Currency" />
|
||||
<Property Name="Symbol" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="FractionalDigits" Type="Edm.Byte" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="City">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<ComplexType Name="PhoneNumber">
|
||||
<Property Name="Number" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Type" Type="Edm.String" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="CellPhoneNumber" BaseType="Model.PhoneNumber">
|
||||
<Property Name="Carrier" Type="Edm.String" Nullable="false" />
|
||||
</ComplexType>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,591 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
|
||||
<edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0"
|
||||
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
>
|
||||
<Schema Namespace="NorthwindModel" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Description" Type="Edm.String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Picture" Type="Edm.Binary" MaxLength="Max" FixedLength="false" />
|
||||
<NavigationProperty Name="Products" Relationship="NorthwindModel.FK_Products_Categories" ToRole="Products"
|
||||
FromRole="Categories" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographic">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="true" Unicode="true" />
|
||||
<Property Name="CustomerDesc" Type="Edm.String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Customers" Relationship="NorthwindModel.CustomerCustomerDemo" ToRole="Customers"
|
||||
FromRole="CustomerDemographics" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" FixedLength="true" Unicode="true" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Orders" Relationship="NorthwindModel.FK_Orders_Customers" ToRole="Orders"
|
||||
FromRole="Customers" />
|
||||
<NavigationProperty Name="CustomerDemographics" Relationship="NorthwindModel.CustomerCustomerDemo"
|
||||
ToRole="CustomerDemographics" FromRole="Customers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Title" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" FixedLength="false" Unicode="true" />
|
||||
<Property Name="BirthDate" Type="Edm.DateTime" />
|
||||
<Property Name="HireDate" Type="Edm.DateTime" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="HomePhone" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Extension" Type="Edm.String" MaxLength="4" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Photo" Type="Edm.Binary" MaxLength="Max" FixedLength="false" />
|
||||
<Property Name="Notes" Type="Edm.String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ReportsTo" Type="Edm.Int32" />
|
||||
<Property Name="PhotoPath" Type="Edm.String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Employees1" Relationship="NorthwindModel.FK_Employees_Employees" ToRole="Employees1"
|
||||
FromRole="Employees" />
|
||||
<NavigationProperty Name="Employee1" Relationship="NorthwindModel.FK_Employees_Employees" ToRole="Employees"
|
||||
FromRole="Employees1" />
|
||||
<NavigationProperty Name="Orders" Relationship="NorthwindModel.FK_Orders_Employees" ToRole="Orders"
|
||||
FromRole="Employees" />
|
||||
<NavigationProperty Name="Territories" Relationship="NorthwindModel.EmployeeTerritories" ToRole="Territories"
|
||||
FromRole="Employees" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Detail">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<NavigationProperty Name="Order" Relationship="NorthwindModel.FK_Order_Details_Orders" ToRole="Orders"
|
||||
FromRole="Order_Details" />
|
||||
<NavigationProperty Name="Product" Relationship="NorthwindModel.FK_Order_Details_Products" ToRole="Products"
|
||||
FromRole="Order_Details" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" FixedLength="true" Unicode="true" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTime" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Customer" Relationship="NorthwindModel.FK_Orders_Customers" ToRole="Customers"
|
||||
FromRole="Orders" />
|
||||
<NavigationProperty Name="Employee" Relationship="NorthwindModel.FK_Orders_Employees" ToRole="Employees"
|
||||
FromRole="Orders" />
|
||||
<NavigationProperty Name="Order_Details" Relationship="NorthwindModel.FK_Order_Details_Orders" ToRole="Order_Details"
|
||||
FromRole="Orders" />
|
||||
<NavigationProperty Name="Shipper" Relationship="NorthwindModel.FK_Orders_Shippers" ToRole="Shippers"
|
||||
FromRole="Orders" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Relationship="NorthwindModel.FK_Products_Categories" ToRole="Categories"
|
||||
FromRole="Products" />
|
||||
<NavigationProperty Name="Order_Details" Relationship="NorthwindModel.FK_Order_Details_Products"
|
||||
ToRole="Order_Details" FromRole="Products" />
|
||||
<NavigationProperty Name="Supplier" Relationship="NorthwindModel.FK_Products_Suppliers" ToRole="Suppliers"
|
||||
FromRole="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="true" Unicode="true" />
|
||||
<NavigationProperty Name="Territories" Relationship="NorthwindModel.FK_Territories_Region" ToRole="Territories"
|
||||
FromRole="Region" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shipper">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Orders" Relationship="NorthwindModel.FK_Orders_Shippers" ToRole="Orders"
|
||||
FromRole="Shippers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" FixedLength="false" Unicode="true" />
|
||||
<Property Name="HomePage" Type="Edm.String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<NavigationProperty Name="Products" Relationship="NorthwindModel.FK_Products_Suppliers" ToRole="Products"
|
||||
FromRole="Suppliers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territory">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="true"
|
||||
Unicode="true" />
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Region" Relationship="NorthwindModel.FK_Territories_Region" ToRole="Region"
|
||||
FromRole="Territories" />
|
||||
<NavigationProperty Name="Employees" Relationship="NorthwindModel.EmployeeTerritories" ToRole="Employees"
|
||||
FromRole="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Alphabetical_list_of_product">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Current_Product_List">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer_and_Suppliers_by_City">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="Relationship" />
|
||||
</Key>
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Invoice">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerName" />
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="Salesperson" />
|
||||
<PropertyRef Name="ShipperName" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" FixedLength="true" Unicode="true" />
|
||||
<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" FixedLength="false" Unicode="true" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTime" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Details_Extended">
|
||||
<Key>
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Subtotal">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Orders_Qry">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" FixedLength="true" Unicode="true" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTime" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" FixedLength="false" Unicode="true" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_Above_Average_Price">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_Totals_by_Amount">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Quarter">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Year">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTime" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<Association Name="FK_Products_Categories">
|
||||
<End Type="NorthwindModel.Category" Role="Categories" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Product" Role="Products" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Categories">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="CustomerCustomerDemo">
|
||||
<End Type="NorthwindModel.Customer" Role="Customers" Multiplicity="*" />
|
||||
<End Type="NorthwindModel.CustomerDemographic" Role="CustomerDemographics" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Customers">
|
||||
<End Type="NorthwindModel.Customer" Role="Customers" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Order" Role="Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Customers">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Employees_Employees">
|
||||
<End Type="NorthwindModel.Employee" Role="Employees" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Employee" Role="Employees1" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Employees1">
|
||||
<PropertyRef Name="ReportsTo" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Employees">
|
||||
<End Type="NorthwindModel.Employee" Role="Employees" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Order" Role="Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Employees">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="EmployeeTerritories">
|
||||
<End Type="NorthwindModel.Territory" Role="Territories" Multiplicity="*" />
|
||||
<End Type="NorthwindModel.Employee" Role="Employees" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Orders">
|
||||
<End Type="NorthwindModel.Order" Role="Orders" Multiplicity="1" />
|
||||
<End Type="NorthwindModel.Order_Detail" Role="Order_Details" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Orders">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order_Details">
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Order_Details_Products">
|
||||
<End Type="NorthwindModel.Product" Role="Products" Multiplicity="1" />
|
||||
<End Type="NorthwindModel.Order_Detail" Role="Order_Details" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Products">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Principal>
|
||||
<Dependent Role="Order_Details">
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Orders_Shippers">
|
||||
<End Type="NorthwindModel.Shipper" Role="Shippers" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Order" Role="Orders" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Shippers">
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Principal>
|
||||
<Dependent Role="Orders">
|
||||
<PropertyRef Name="ShipVia" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Products_Suppliers">
|
||||
<End Type="NorthwindModel.Supplier" Role="Suppliers" Multiplicity="0..1" />
|
||||
<End Type="NorthwindModel.Product" Role="Products" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Suppliers">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Principal>
|
||||
<Dependent Role="Products">
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
<Association Name="FK_Territories_Region">
|
||||
<End Type="NorthwindModel.Region" Role="Region" Multiplicity="1" />
|
||||
<End Type="NorthwindModel.Territory" Role="Territories" Multiplicity="*" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Region">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Principal>
|
||||
<Dependent Role="Territories">
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
</Schema>
|
||||
<Schema Namespace="ODataWebV3.Northwind.Model" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
|
||||
<EntityContainer Name="NorthwindEntities" m:IsDefaultEntityContainer="true" p6:LazyLoadingEnabled="true"
|
||||
xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"
|
||||
>
|
||||
<EntitySet Name="Categories" EntityType="NorthwindModel.Category" />
|
||||
<EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic" />
|
||||
<EntitySet Name="Customers" EntityType="NorthwindModel.Customer" />
|
||||
<EntitySet Name="Employees" EntityType="NorthwindModel.Employee" />
|
||||
<EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail" />
|
||||
<EntitySet Name="Orders" EntityType="NorthwindModel.Order" />
|
||||
<EntitySet Name="Products" EntityType="NorthwindModel.Product" />
|
||||
<EntitySet Name="Regions" EntityType="NorthwindModel.Region" />
|
||||
<EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper" />
|
||||
<EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier" />
|
||||
<EntitySet Name="Territories" EntityType="NorthwindModel.Territory" />
|
||||
<EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_product" />
|
||||
<EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" />
|
||||
<EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" />
|
||||
<EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" />
|
||||
<EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" />
|
||||
<EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" />
|
||||
<EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" />
|
||||
<EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" />
|
||||
<EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" />
|
||||
<EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" />
|
||||
<EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" />
|
||||
<EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" />
|
||||
<EntitySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" />
|
||||
<AssociationSet Name="FK_Products_Categories" Association="NorthwindModel.FK_Products_Categories">
|
||||
<End Role="Categories" EntitySet="Categories" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="CustomerCustomerDemo" Association="NorthwindModel.CustomerCustomerDemo">
|
||||
<End Role="CustomerDemographics" EntitySet="CustomerDemographics" />
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Customers" Association="NorthwindModel.FK_Orders_Customers">
|
||||
<End Role="Customers" EntitySet="Customers" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Employees_Employees" Association="NorthwindModel.FK_Employees_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Employees1" EntitySet="Employees" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Employees" Association="NorthwindModel.FK_Orders_Employees">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="EmployeeTerritories" Association="NorthwindModel.EmployeeTerritories">
|
||||
<End Role="Employees" EntitySet="Employees" />
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Orders" Association="NorthwindModel.FK_Order_Details_Orders">
|
||||
<End Role="Order_Details" EntitySet="Order_Details" />
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Order_Details_Products" Association="NorthwindModel.FK_Order_Details_Products">
|
||||
<End Role="Order_Details" EntitySet="Order_Details" />
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Orders_Shippers" Association="NorthwindModel.FK_Orders_Shippers">
|
||||
<End Role="Orders" EntitySet="Orders" />
|
||||
<End Role="Shippers" EntitySet="Shippers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Products_Suppliers" Association="NorthwindModel.FK_Products_Suppliers">
|
||||
<End Role="Products" EntitySet="Products" />
|
||||
<End Role="Suppliers" EntitySet="Suppliers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="FK_Territories_Region" Association="NorthwindModel.FK_Territories_Region">
|
||||
<End Role="Region" EntitySet="Regions" />
|
||||
<End Role="Territories" EntitySet="Territories" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,453 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="NorthwindModel" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="Description" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="Picture" Type="Edm.Binary" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographic">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="CustomerDesc" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Customers" Type="Collection(NorthwindModel.Customer)" Partner="CustomerDemographics" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Customer" />
|
||||
<NavigationProperty Name="CustomerDemographics" Type="Collection(NorthwindModel.CustomerDemographic)"
|
||||
Partner="Customers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="Title" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" />
|
||||
<Property Name="BirthDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="HireDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="HomePhone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Extension" Type="Edm.String" MaxLength="4" />
|
||||
<Property Name="Photo" Type="Edm.Binary" MaxLength="max" />
|
||||
<Property Name="Notes" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="ReportsTo" Type="Edm.Int32" />
|
||||
<Property Name="PhotoPath" Type="Edm.String" MaxLength="255" />
|
||||
<NavigationProperty Name="Employees1" Type="Collection(NorthwindModel.Employee)" Partner="Employee1" />
|
||||
<NavigationProperty Name="Employee1" Type="NorthwindModel.Employee" Partner="Employees1">
|
||||
<ReferentialConstraint Property="ReportsTo" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Employee" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Employees" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Detail">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<NavigationProperty Name="Order" Type="NorthwindModel.Order" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="OrderID" ReferencedProperty="OrderID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Product" Type="NorthwindModel.Product" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="ProductID" ReferencedProperty="ProductID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<NavigationProperty Name="Customer" Type="NorthwindModel.Customer" Partner="Orders">
|
||||
<ReferentialConstraint Property="CustomerID" ReferencedProperty="CustomerID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employee" Type="NorthwindModel.Employee" Partner="Orders">
|
||||
<ReferentialConstraint Property="EmployeeID" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Order" />
|
||||
<NavigationProperty Name="Shipper" Type="NorthwindModel.Shipper" Partner="Orders">
|
||||
<ReferentialConstraint Property="ShipVia" ReferencedProperty="ShipperID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
|
||||
<ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product" />
|
||||
<NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
|
||||
<ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Region" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shipper">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Shipper" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="HomePage" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Supplier" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territory">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Region" Type="NorthwindModel.Region" Nullable="false" Partner="Territories">
|
||||
<ReferentialConstraint Property="RegionID" ReferencedProperty="RegionID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employees" Type="Collection(NorthwindModel.Employee)" Partner="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Alphabetical_list_of_product">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Current_Product_List">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer_and_Suppliers_by_City">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="Relationship" />
|
||||
</Key>
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Invoice">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerName" />
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="Salesperson" />
|
||||
<PropertyRef Name="ShipperName" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Details_Extended">
|
||||
<Key>
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Subtotal">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Orders_Qry">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_Above_Average_Price">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_Totals_by_Amount">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Quarter">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Year">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
<Schema Namespace="ODataWebExperimental.Northwind.Model" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityContainer Name="NorthwindEntities">
|
||||
<Annotation Term="Capabilities.KeyAsSegmentSupported" />
|
||||
<EntitySet Name="Categories" EntityType="NorthwindModel.Category">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic">
|
||||
<NavigationPropertyBinding Path="Customers" Target="Customers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Customers" EntityType="NorthwindModel.Customer">
|
||||
<NavigationPropertyBinding Path="CustomerDemographics" Target="CustomerDemographics" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Employees" EntityType="NorthwindModel.Employee">
|
||||
<NavigationPropertyBinding Path="Employees1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Employee1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail">
|
||||
<NavigationPropertyBinding Path="Order" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Product" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Orders" EntityType="NorthwindModel.Order">
|
||||
<NavigationPropertyBinding Path="Customer" Target="Customers" />
|
||||
<NavigationPropertyBinding Path="Employee" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Shipper" Target="Shippers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Products" EntityType="NorthwindModel.Product">
|
||||
<NavigationPropertyBinding Path="Category" Target="Categories" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Regions" EntityType="NorthwindModel.Region">
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper">
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Territories" EntityType="NorthwindModel.Territory">
|
||||
<NavigationPropertyBinding Path="Employees" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Region" Target="Regions" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_product" />
|
||||
<EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" />
|
||||
<EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" />
|
||||
<EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" />
|
||||
<EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" />
|
||||
<EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" />
|
||||
<EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" />
|
||||
<EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" />
|
||||
<EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" />
|
||||
<EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" />
|
||||
<EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" />
|
||||
<EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" />
|
||||
<EntitySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,449 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="NorthwindModel" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="Description" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="Picture" Type="Edm.Binary" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographic">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="CustomerDesc" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Customers" Type="Collection(NorthwindModel.Customer)" Partner="CustomerDemographics" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Customer" />
|
||||
<NavigationProperty Name="CustomerDemographics" Type="Collection(NorthwindModel.CustomerDemographic)"
|
||||
Partner="Customers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="Title" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" />
|
||||
<Property Name="BirthDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="HireDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="HomePhone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Extension" Type="Edm.String" MaxLength="4" />
|
||||
<Property Name="Photo" Type="Edm.Binary" MaxLength="max" />
|
||||
<Property Name="Notes" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="ReportsTo" Type="Edm.Int32" />
|
||||
<Property Name="PhotoPath" Type="Edm.String" MaxLength="255" />
|
||||
<NavigationProperty Name="Employees1" Type="Collection(NorthwindModel.Employee)" Partner="Employee1" />
|
||||
<NavigationProperty Name="Employee1" Type="NorthwindModel.Employee" Partner="Employees1">
|
||||
<ReferentialConstraint Property="ReportsTo" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Employee" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Employees" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Detail">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<NavigationProperty Name="Order" Type="NorthwindModel.Order" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="OrderID" ReferencedProperty="OrderID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Product" Type="NorthwindModel.Product" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="ProductID" ReferencedProperty="ProductID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<NavigationProperty Name="Customer" Type="NorthwindModel.Customer" Partner="Orders">
|
||||
<ReferentialConstraint Property="CustomerID" ReferencedProperty="CustomerID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employee" Type="NorthwindModel.Employee" Partner="Orders">
|
||||
<ReferentialConstraint Property="EmployeeID" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Order" />
|
||||
<NavigationProperty Name="Shipper" Type="NorthwindModel.Shipper" Partner="Orders">
|
||||
<ReferentialConstraint Property="ShipVia" ReferencedProperty="ShipperID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
|
||||
<ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product" />
|
||||
<NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
|
||||
<ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Region" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shipper">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Shipper" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="HomePage" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Supplier" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territory">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Region" Type="NorthwindModel.Region" Nullable="false" Partner="Territories">
|
||||
<ReferentialConstraint Property="RegionID" ReferencedProperty="RegionID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employees" Type="Collection(NorthwindModel.Employee)" Partner="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Alphabetical_list_of_product">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Current_Product_List">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer_and_Suppliers_by_City">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="Relationship" />
|
||||
</Key>
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Invoice">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerName" />
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="Salesperson" />
|
||||
<PropertyRef Name="ShipperName" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Details_Extended">
|
||||
<Key>
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Subtotal">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Orders_Qry">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_Above_Average_Price">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_Totals_by_Amount">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Quarter">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Year">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
<Schema Namespace="ODataWebExperimental.Northwind.Model" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityContainer Name="NorthwindEntities">
|
||||
<EntitySet Name="Categories" EntityType="NorthwindModel.Category">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic">
|
||||
<NavigationPropertyBinding Path="Customers" Target="Customers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Customers" EntityType="NorthwindModel.Customer">
|
||||
<NavigationPropertyBinding Path="CustomerDemographics" Target="CustomerDemographics" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Employees" EntityType="NorthwindModel.Employee">
|
||||
<NavigationPropertyBinding Path="Employees1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Employee1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail">
|
||||
<NavigationPropertyBinding Path="Order" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Product" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Orders" EntityType="NorthwindModel.Order">
|
||||
<NavigationPropertyBinding Path="Customer" Target="Customers" />
|
||||
<NavigationPropertyBinding Path="Employee" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Shipper" Target="Shippers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Products" EntityType="NorthwindModel.Product">
|
||||
<NavigationPropertyBinding Path="Category" Target="Categories" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Regions" EntityType="NorthwindModel.Region">
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper">
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Territories" EntityType="NorthwindModel.Territory">
|
||||
<NavigationPropertyBinding Path="Employees" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Region" Target="Regions" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_product" />
|
||||
<EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" />
|
||||
<EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" />
|
||||
<EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" />
|
||||
<EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" />
|
||||
<EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" />
|
||||
<EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" />
|
||||
<EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" />
|
||||
<EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" />
|
||||
<EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" />
|
||||
<EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" />
|
||||
<EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" />
|
||||
<EntitySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="./Products.xml">
|
||||
<edmx:Include Namespace="ProductService" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="PeopleService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Address" Type="PeopleService.Address" />
|
||||
<Property Name="Location" Type="Edm.GeographyPoint" SRID="variable" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Type="Collection(ProductService.Product)" Partner="Supplier" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="Country" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="PersonDetail" Type="PeopleService.PersonDetail" Partner="Person" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer" BaseType="PeopleService.Person">
|
||||
<Property Name="TotalExpense" Type="Edm.Decimal" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee" BaseType="PeopleService.Person">
|
||||
<Property Name="EmployeeID" Type="Edm.Int64" Nullable="false" />
|
||||
<Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="Salary" Type="Edm.Single" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="PersonID" />
|
||||
</Key>
|
||||
<Property Name="PersonID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Age" Type="Edm.Byte" Nullable="false" />
|
||||
<Property Name="Gender" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="Phone" Type="Edm.String" />
|
||||
<Property Name="Address" Type="PeopleService.Address" />
|
||||
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
|
||||
<NavigationProperty Name="Person" Type="PeopleService.Person" Partner="PersonDetail" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.KeyAsSegmentSupported" />
|
||||
<EntitySet Name="Suppliers" EntityType="PeopleService.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="ProductService.Container/Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="People" EntityType="PeopleService.Person">
|
||||
<NavigationPropertyBinding Path="PersonDetail" Target="PersonDetails" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="PersonDetails" EntityType="PeopleService.PersonDetail">
|
||||
<NavigationPropertyBinding Path="Person" Target="Persons" />
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
<Annotations Target="PeopleService.Container">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
||||
</Annotations>
|
||||
<Annotations Target="PeopleService.Product">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
||||
</Annotations>
|
||||
<Annotations Target="PeopleService.Product/Name">
|
||||
<Annotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
||||
</Annotations>
|
||||
<Annotations Target="PeopleService.Container/Suppliers">
|
||||
<Annotation Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." />
|
||||
<Annotation Term="Org.OData.Publication.V1.PublisherId" String="MSFT" />
|
||||
<Annotation Term="Org.OData.Publication.V1.Keywords" String="Inventory, Supplier, Advertisers, Sales, Finance" />
|
||||
<Annotation Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.AttributionDescription" String="All rights reserved" />
|
||||
<Annotation Term="Org.OData.Publication.V1.DocumentationUrl " String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl" String="All rights reserved" />
|
||||
<Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl" String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.LastModified" String="4/2/2013" />
|
||||
<Annotation Term="Org.OData.Publication.V1.ImageUrl " String="http://www.odata.org/" />
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="./People.xml">
|
||||
<edmx:Include Namespace="PeopleService" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="ProductService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="ReleaseDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Double" Nullable="false" />
|
||||
<NavigationProperty Name="Categories" Type="Collection(ProductService.Category)" Partner="Products" />
|
||||
<NavigationProperty Name="Supplier" Type="PeopleService.Supplier" Partner="Products" />
|
||||
<NavigationProperty Name="ProductDetail" Type="ProductService.ProductDetail" Partner="Product" />
|
||||
</EntityType>
|
||||
<EntityType Name="FeaturedProduct" BaseType="ProductService.Product">
|
||||
<NavigationProperty Name="Advertisement" Type="ProductService.Advertisement" Partner="FeaturedProduct" />
|
||||
</EntityType>
|
||||
<EntityType Name="ProductDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Details" Type="Edm.String" />
|
||||
<NavigationProperty Name="Product" Type="ProductService.Product" Partner="ProductDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="Products" Type="Collection(ProductService.Product)" Partner="Categories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Advertisement" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<NavigationProperty Name="FeaturedProduct" Type="ProductService.FeaturedProduct" Partner="Advertisement" />
|
||||
</EntityType>
|
||||
<Action Name="Discount" IsBound="true">
|
||||
<Parameter Name="product" Type="ProductService.Product" />
|
||||
<Parameter Name="discountPercentage" Type="Edm.Int32" Nullable="false" />
|
||||
<ReturnType Type="Edm.Double" Nullable="false" />
|
||||
</Action>
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.KeyAsSegmentSupported" />
|
||||
<EntitySet Name="Products" EntityType="ProductService.Product">
|
||||
<NavigationPropertyBinding Path="ProductService.FeaturedProduct/Advertisement"
|
||||
Target="Advertisements" />
|
||||
<NavigationPropertyBinding Path="Categories" Target="Categories" />
|
||||
<NavigationPropertyBinding Path="Supplier" Target="PeopleService.Container/Suppliers" />
|
||||
<NavigationPropertyBinding Path="ProductDetail" Target="ProductDetails" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="ProductDetails" EntityType="ProductService.ProductDetail">
|
||||
<NavigationPropertyBinding Path="Product" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Categories" EntityType="ProductService.Category">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Advertisements" EntityType="ProductService.Advertisement">
|
||||
<NavigationPropertyBinding Path="FeaturedProduct" Target="Products" />
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
<Annotations Target="ProductService.Container">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
||||
</Annotations>
|
||||
<Annotations Target="ProductService.Product">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
||||
</Annotations>
|
||||
<Annotations Target="ProductService.Product/Name">
|
||||
<Annotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,14 @@
|
|||
# Examples
|
||||
|
||||
Description | CSDL XML |OpenAPI 3.0.x
|
||||
------------|----------|-------------
|
||||
The [Products and Categories Example](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/cs01/odata-csdl-xml-v4.01-cs01.html#sec_ProductsandCategoriesExample) from the [OData CSDL XML specification](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html) | [csdl-16.1.xml](csdl-16.1.xml) | [csdl-16.1.openapi3.json](csdl-16.1.openapi3.json)
|
||||
The [TripPin reference service](http://services.odata.org/TripPinRESTierService/(S(g1oafwlrmrrsxbqyul33p15y))/) from www.odata.org | [TripPin.xml](TripPin.xml) | [TripPin.openapi3.json](TripPin.openapi3.json)
|
||||
The [Northwind OData V4 reference service](http://services.odata.org/V4/Northwind/Northwind.svc/) | [Northwind.xml](Northwind.xml) | [Northwind.openapi3.json](Northwind.openapi3.json)
|
||||
A hypothetical Northwind OData V4 service using [key-as-segment convention](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_KeyasSegmentConvention) | [Northwind-key-as-segment.xml](Northwind-key-as-segment.xml) | [Northwind-key-as-segment.openapi3.json](Northwind-key-as-segment.openapi3.json)
|
||||
The [Northwind OData V3 reference service](http://services.odata.org/V3/Northwind/Northwind.svc/) | [Northwind-V3.xml](Northwind-V3.xml) | [Northwind-V3.openapi3.json](Northwind-V3.openapi3.json)
|
||||
A collection of examples from the [OData CSDL XML specification](http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html) | [miscellaneous.xml](miscellaneous.xml) | [miscellaneous.openapi3.json](miscellaneous.openapi3.json)
|
||||
People service referencing a Products service | [People.xml](People.xml)| [People.openapi3.json](People.openapi3.json)
|
||||
Products service referencing a People service | [Products.xml](Products.xml) | [Products.openapi3.json](Products.openapi3.json)
|
||||
|
||||
<!-- add remaining examples -->
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,342 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Measures.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Microsoft.OData.SampleService.Models.TripPin" xmlns="http://docs.oasis-open.org/odata/ns/edm" >
|
||||
<EnumType Name="PersonGender">
|
||||
<Member Name="Male" Value="0" />
|
||||
<Member Name="Female" Value="1" />
|
||||
<Member Name="Unknown" Value="2" />
|
||||
</EnumType>
|
||||
<ComplexType Name="City">
|
||||
<Property Name="CountryRegion" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Region" Type="Edm.String" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="Location" OpenType="true">
|
||||
<Property Name="Address" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="City" Type="Microsoft.OData.SampleService.Models.TripPin.City" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="EventLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
|
||||
<Property Name="BuildingInfo" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="AirportLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
|
||||
<Property Name="Loc" Type="Edm.GeographyPoint" Nullable="false" SRID="4326" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Photo" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="Id" />
|
||||
</Key>
|
||||
<Property Name="Id" Type="Edm.Int64" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes">
|
||||
<Collection>
|
||||
<String>image/jpeg</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntityType>
|
||||
<EntityType Name="Person" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="UserName" />
|
||||
</Key>
|
||||
<Property Name="UserName" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Emails" Type="Collection(Edm.String)" />
|
||||
<Property Name="AddressInfo" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Location)" />
|
||||
<Property Name="Gender" Type="Microsoft.OData.SampleService.Models.TripPin.PersonGender" />
|
||||
<Property Name="Concurrency" Type="Edm.Int64" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Computed" Bool="true" />
|
||||
</Property>
|
||||
<NavigationProperty Name="Friends" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)" />
|
||||
<NavigationProperty Name="Trips" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)"
|
||||
ContainsTarget="true" />
|
||||
<NavigationProperty Name="Photo" Type="Microsoft.OData.SampleService.Models.TripPin.Photo" />
|
||||
</EntityType>
|
||||
<EntityType Name="Airline">
|
||||
<Key>
|
||||
<PropertyRef Name="AirlineCode" />
|
||||
</Key>
|
||||
<Property Name="AirlineCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Airport">
|
||||
<Key>
|
||||
<PropertyRef Name="IcaoCode" />
|
||||
</Key>
|
||||
<Property Name="IcaoCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="IataCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Immutable" Bool="true" />
|
||||
</Property>
|
||||
<Property Name="Location" Type="Microsoft.OData.SampleService.Models.TripPin.AirportLocation" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PlanItem">
|
||||
<Key>
|
||||
<PropertyRef Name="PlanItemId" />
|
||||
</Key>
|
||||
<Property Name="PlanItemId" Type="Edm.Int32" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ConfirmationCode" Type="Edm.String" />
|
||||
<Property Name="StartsAt" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="EndsAt" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Duration" Type="Edm.Duration" />
|
||||
</EntityType>
|
||||
<EntityType Name="PublicTransportation" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem">
|
||||
<Property Name="SeatNumber" Type="Edm.String" />
|
||||
</EntityType>
|
||||
<EntityType Name="Flight" BaseType="Microsoft.OData.SampleService.Models.TripPin.PublicTransportation">
|
||||
<Property Name="FlightNumber" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="From" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
<NavigationProperty Name="To" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
<NavigationProperty Name="Airline" Type="Microsoft.OData.SampleService.Models.TripPin.Airline"
|
||||
Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Event" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem" OpenType="true">
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="OccursAt" Type="Microsoft.OData.SampleService.Models.TripPin.EventLocation" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Trip">
|
||||
<Key>
|
||||
<PropertyRef Name="TripId" />
|
||||
</Key>
|
||||
<Property Name="TripId" Type="Edm.Int32" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ShareId" Type="Edm.Guid" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Budget" Type="Edm.Single" Nullable="false">
|
||||
<Annotation Term="Org.OData.Measures.V1.ISOCurrency" String="USD" />
|
||||
<Annotation Term="Org.OData.Measures.V1.Scale" Int="2" />
|
||||
</Property>
|
||||
<Property Name="StartsAt" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="EndsAt" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="Tags" Type="Collection(Edm.String)" Nullable="false" />
|
||||
<NavigationProperty Name="Photos" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Photo)" />
|
||||
<NavigationProperty Name="PlanItems" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.PlanItem)"
|
||||
ContainsTarget="true" />
|
||||
</EntityType>
|
||||
<Function Name="GetFavoriteAirline" IsBound="true"
|
||||
EntitySetPath="person/Trips/PlanItems/Microsoft.OData.SampleService.Models.TripPin.Flight/Airline" IsComposable="true"
|
||||
>
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airline" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetInvolvedPeople" IsBound="true" IsComposable="true">
|
||||
<Parameter Name="trip" Type="Microsoft.OData.SampleService.Models.TripPin.Trip" Nullable="false" />
|
||||
<ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetFriendsTrips" IsBound="true" EntitySetPath="person/Friends/Trips" IsComposable="true">
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<Parameter Name="userName" Type="Edm.String" Nullable="false" />
|
||||
<ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetNearestAirport" IsComposable="true">
|
||||
<Parameter Name="lat" Type="Edm.Double" Nullable="false" />
|
||||
<Parameter Name="lon" Type="Edm.Double" Nullable="false" />
|
||||
<ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
</Function>
|
||||
<Action Name="ResetDataSource" />
|
||||
<Action Name="ShareTrip" IsBound="true">
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<Parameter Name="userName" Type="Edm.String" Nullable="false" />
|
||||
<Parameter Name="tripId" Type="Edm.Int32" Nullable="false" />
|
||||
</Action>
|
||||
<EntityContainer Name="DefaultContainer">
|
||||
<EntitySet Name="Photos" EntityType="Microsoft.OData.SampleService.Models.TripPin.Photo">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Photos" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="People" EntityType="Microsoft.OData.SampleService.Models.TripPin.Person">
|
||||
<NavigationPropertyBinding Path="Friends" Target="People" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline"
|
||||
Target="Airlines" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Photo" Target="Photos" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos"
|
||||
Target="Photos" />
|
||||
<Annotation Term="Org.OData.Core.V1.OptimisticConcurrency">
|
||||
<Collection>
|
||||
<PropertyPath>Concurrency</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="People" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection>
|
||||
<NavigationPropertyPath>Trips</NavigationPropertyPath>
|
||||
<NavigationPropertyPath>Friends</NavigationPropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="Airlines" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airline">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airlines" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="Airports" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airport">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airports" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable" Bool="false" />
|
||||
<PropertyValue Property="NonDeletableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="Me" Type="Microsoft.OData.SampleService.Models.TripPin.Person">
|
||||
<NavigationPropertyBinding Path="Friends" Target="People" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline"
|
||||
Target="Airlines" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Photo" Target="Photos" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos"
|
||||
Target="Photos" />
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Me" />
|
||||
</Singleton>
|
||||
<FunctionImport Name="GetNearestAirport" Function="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport"
|
||||
EntitySet="Airports" IncludeInServiceDocument="true"
|
||||
>
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport" />
|
||||
</FunctionImport>
|
||||
<ActionImport Name="ResetDataSource" Action="Microsoft.OData.SampleService.Models.TripPin.ResetDataSource" />
|
||||
<Annotation Term="Org.OData.Core.V1.Description" String="TripPin service is a sample service for OData V4." />
|
||||
</EntityContainer>
|
||||
<Annotations Target="Microsoft.OData.SampleService.Models.TripPin.DefaultContainer">
|
||||
<Annotation Term="Org.OData.Core.V1.DereferenceableIDs" Bool="true" />
|
||||
<Annotation Term="Org.OData.Core.V1.ConventionalIDs" Bool="true" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.ConformanceLevel">
|
||||
<EnumMember>Org.OData.Capabilities.V1.ConformanceLevelType/Advanced</EnumMember>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SupportedFormats">
|
||||
<Collection>
|
||||
<String>application/json;odata.metadata=full;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
<String>application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
<String>application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.AsynchronousRequestsSupported" Bool="true" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.BatchContinueOnErrorSupported" Bool="false" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.FilterFunctions">
|
||||
<Collection>
|
||||
<String>contains</String>
|
||||
<String>endswith</String>
|
||||
<String>startswith</String>
|
||||
<String>length</String>
|
||||
<String>indexof</String>
|
||||
<String>substring</String>
|
||||
<String>tolower</String>
|
||||
<String>toupper</String>
|
||||
<String>trim</String>
|
||||
<String>concat</String>
|
||||
<String>year</String>
|
||||
<String>month</String>
|
||||
<String>day</String>
|
||||
<String>hour</String>
|
||||
<String>minute</String>
|
||||
<String>second</String>
|
||||
<String>round</String>
|
||||
<String>floor</String>
|
||||
<String>ceiling</String>
|
||||
<String>cast</String>
|
||||
<String>isof</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,152 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml">
|
||||
<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Alias="SalesModel" Namespace="org.example.odata.salesservice">
|
||||
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Type="Collection(SalesModel.Product)" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Currency">
|
||||
<Key>
|
||||
<PropertyRef Name="Code" />
|
||||
</Key>
|
||||
<Property Name="Code" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String">
|
||||
<Annotation Term="Core.IsLanguageDependent" />
|
||||
</Property>
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(SalesModel.Sales)" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Country" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Type="SalesModel.Category" />
|
||||
<NavigationProperty Name="Sales" Type="Collection(SalesModel.Sales)" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Color" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="TaxRate" Type="Edm.Decimal" Nullable="false" Scale="variable" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Sales">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Customer" Type="SalesModel.Customer" Nullable="false" />
|
||||
<NavigationProperty Name="Time" Type="SalesModel.Time" Nullable="false" />
|
||||
<NavigationProperty Name="Product" Type="SalesModel.Product" Nullable="false" />
|
||||
<NavigationProperty Name="SalesOrganization" Type="SalesModel.SalesOrganization" Nullable="false" />
|
||||
<NavigationProperty Name="Currency" Type="SalesModel.Currency" Nullable="false" />
|
||||
<Property Name="Amount" Type="Edm.Decimal" Scale="variable">
|
||||
<Annotation Term="Aggregation.Aggregateable" />
|
||||
<Annotation Term="Aggregation.ContextDefiningProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Currency/Code</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Annotation Term="Aggregation.CustomAggregate" Qualifier="Forecast" String="Edm.Decimal">
|
||||
<Annotation Term="Aggregation.ContextDefiningProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Currency/Code</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotation>
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="SalesOrganization">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="Superordinate" Type="SalesModel.SalesOrganization" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Time">
|
||||
<Key>
|
||||
<PropertyRef Name="Date" />
|
||||
</Key>
|
||||
<Property Name="Date" Type="Edm.Date" />
|
||||
<Property Name="Month" Type="Edm.String" />
|
||||
<Property Name="Quarter" Type="Edm.String" />
|
||||
<Property Name="Year" Type="Edm.String" />
|
||||
</EntityType>
|
||||
|
||||
<Annotations Target="SalesModel.Product">
|
||||
<Annotation Term="Aggregation.LeveledHierarchy" Qualifier="ProductHierarchy">
|
||||
<Record>
|
||||
<PropertyValue Property="Levels">
|
||||
<Collection>
|
||||
<String>Category/Name</String>
|
||||
<String>Name</String>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="SalesModel.Time">
|
||||
<Annotation Term="Aggregation.LeveledHierarchy" Qualifier="TimeHierarchy">
|
||||
<Record>
|
||||
<PropertyValue Property="Levels">
|
||||
<Collection>
|
||||
<String>Year</String>
|
||||
<String>Quarter</String>
|
||||
<String>Month</String>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="SalesModel.SalesOrganization">
|
||||
<Annotation Term="Aggregation.RecursiveHierarchy" Qualifier="SalesOrgHierarchy">
|
||||
<Record>
|
||||
<PropertyValue Property="NodeProperty" String="ID" />
|
||||
<PropertyValue Property="ParentNodeProperty" String="Superordinate/ID" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<EntityContainer Name="Default">
|
||||
<Annotation Term="Aggregation.ApplySupported">
|
||||
<Record>
|
||||
<PropertyValue Property="PropertyRestrictions" Bool="true" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
|
||||
<Annotation Term="Aggregation.CustomAggregate" Qualifier="Budget" String="Edm.Decimal">
|
||||
<Annotation Term="Aggregation.ContextDefiningProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Currencies/Code</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotation>
|
||||
|
||||
<EntitySet Name="Sales" EntityType="SalesModel.Sales" />
|
||||
<EntitySet Name="Currencies" EntityType="SalesModel.Currency" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,526 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
|
||||
<!-- TODO:
|
||||
minimum, maximum, exclusive, example, and multipleOf interact
|
||||
- inclusive maximum: take as example
|
||||
- inclusive minimum: take as example
|
||||
- exclusive maximum and no minimum: subtract 1 for example
|
||||
- exclusive minimum and no maximum: add 1 for example
|
||||
- both exclusive minimum and maximum: take average, round to multipleOf if present
|
||||
-->
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Supported.Annotations" Alias="self">
|
||||
<EntityType Name="SinglePartKey">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Pattern" Type="Edm.String">
|
||||
<Annotation Term="Validation.Pattern" String="^.+$" />
|
||||
</Property>
|
||||
<Property Name="PatternExt" Type="Edm.String" />
|
||||
<Property Name="AllowedValues" Type="Edm.String">
|
||||
<Annotation Term="Validation.AllowedValues">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="red" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="green" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="blue" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="AllowedValuesExt" Type="Edm.String" />
|
||||
<Property Name="Maximum" Type="Edm.Decimal" Precision="5" Scale="variable">
|
||||
<Annotation Term="Validation.Maximum" Decimal="0">
|
||||
<Annotation Term="Validation.Exclusive" Bool="true" />
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="MaximumExt" Type="Edm.Decimal" Scale="variable" />
|
||||
<Property Name="Minimum" Type="Edm.Decimal" Precision="5" Scale="2">
|
||||
<Annotation Term="Validation.Minimum" Decimal="1" />
|
||||
</Property>
|
||||
<Property Name="MinimumExt" Type="Edm.Decimal" Scale="5" Nullable="false" />
|
||||
<Property Name="Example" Type="Edm.String">
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Description" String="Primitive example value" />
|
||||
<PropertyValue Property="Value" String="Hello World" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ExampleExt" Type="Edm.String" />
|
||||
<Property Name="Computed" Type="Edm.String">
|
||||
<Annotation Term="Core.Computed" />
|
||||
</Property>
|
||||
<Property Name="ComputedExt" Type="Edm.String" />
|
||||
<Property Name="Immutable" Type="Edm.String">
|
||||
<Annotation Term="Core.Immutable" />
|
||||
</Property>
|
||||
<Property Name="RequiredInFilter" Type="Edm.String" />
|
||||
<Property Name="ImmutableExt" Type="Edm.String" />
|
||||
<NavigationProperty Name="AllOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="AllMany" Type="Collection(self.TwoPartKey)" />
|
||||
<NavigationProperty Name="ReadOnlyOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="ReadOnlyMany" Type="Collection(self.TwoPartKey)" />
|
||||
<NavigationProperty Name="NothingOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="NothingMany" Type="Collection(self.TwoPartKey)" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="TwoPartKey">
|
||||
<Key>
|
||||
<PropertyRef Name="One" />
|
||||
<PropertyRef Name="Two" />
|
||||
</Key>
|
||||
<Property Name="One" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Two" Type="Edm.Int32" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
|
||||
|
||||
<EntitySet Name="AllSet" EntityType="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RequiresFilter" Bool="true" />
|
||||
<PropertyValue Property="RequiredProperties">
|
||||
<Collection>
|
||||
<PropertyPath>RequiredInFilter</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Example</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="NoNavigationSet" EntityType="self.SinglePartKey">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="OneNavigationSet" EntityType="self.SinglePartKey">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="AllMany" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/Recursive" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="ReadListOnlySet" EntityType="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any query options" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<!-- Note: "not indexable by key" implies "no update, no delete" -->
|
||||
<Annotation Term="Capabilities.IndexableByKey" Bool="false" />
|
||||
<Annotation Term="Capabilities.SkipSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.TopSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.CountRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Countable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Filterable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Searchable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Sortable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="AllSingleton" Type="self.SinglePartKey">
|
||||
<Annotation Term="Core.Description" String="First Singleton" />
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
</Singleton>
|
||||
<Singleton Name="ReadOnlySingleton" Type="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support `$select` and `$expand`" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="AllMany" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>One</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="ReadOnlyMany" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="NothingMany" />
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<EntitySet Name="TwoAllSet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoReadOnlySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoReadOnlyByKeySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoWriteOnlySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoNothingSet" EntityType="self.TwoPartKey" />
|
||||
<Singleton Name="TwoWriteOnlySingleton" Type="self.TwoPartKey" />
|
||||
<Singleton Name="TwoNothingSingleton" Type="self.TwoPartKey" />
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/PatternExt">
|
||||
<Annotation Term="Validation.Pattern" String="^.+$" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/AllowedValuesExt">
|
||||
<Annotation Term="Validation.AllowedValues">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="red" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="green" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="blue" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/MaximumExt">
|
||||
<Annotation Term="Validation.Maximum" Decimal="-1" />
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="-1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/MinimumExt">
|
||||
<Annotation Term="Validation.Minimum" Decimal="0">
|
||||
<Annotation Term="Validation.Exclusive" Bool="true" />
|
||||
</Annotation>
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ExampleExt">
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Description" String="Primitive example value" />
|
||||
<PropertyValue Property="Value" String="Hello external World" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ComputedExt">
|
||||
<Annotation Term="Core.Computed" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ImmutableExt">
|
||||
<Annotation Term="Core.Immutable" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoAllSet">
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Two</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<!-- redundant, just to test the conditional logic -->
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="true" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoReadOnlySet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any query options" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SkipSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.TopSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.CountRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Countable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Filterable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Sortable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Searchable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoReadOnlyByKeySet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoWriteOnlySet">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports insert" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports delete" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoNothingSet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.IndexableByKey" Bool="false" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoWriteOnlySingleton">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoNothingSingleton">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,512 @@
|
|||
{
|
||||
"openapi": "3.0.2",
|
||||
"info": {
|
||||
"title": "Service for namespace auth.example",
|
||||
"description": "This service is located at [https://localhost/service-root/](https://localhost/service-root/)\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[Person{bg:lightslategray}],[People%20{bg:lawngreen}]++-*>[Person])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:lightslategray}],[EntitySet/Singleton/Operation{bg:lawngreen}])",
|
||||
"version": ""
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://localhost/service-root"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "People"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/People": {
|
||||
"get": {
|
||||
"summary": "Get entities from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/skip"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/search"
|
||||
},
|
||||
{
|
||||
"name": "$filter",
|
||||
"description": "Filter items by property values, see [Filtering](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionfilter)",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/count"
|
||||
},
|
||||
{
|
||||
"name": "$orderby",
|
||||
"description": "Order items by property values, see [Sorting](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"ID desc",
|
||||
"Name",
|
||||
"Name desc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "$select",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entities",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"title": "Collection of Person",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"$ref": "#/components/schemas/count"
|
||||
},
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"summary": "Add new entity to People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "New entity",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person-create"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/People('{ID}')": {
|
||||
"parameters": [
|
||||
{
|
||||
"description": "key: ID",
|
||||
"in": "path",
|
||||
"name": "ID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Get entity from People by key",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "$select",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update entity in People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "New property values",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person-update"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete entity from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/$batch": {
|
||||
"post": {
|
||||
"summary": "Send a group of requests",
|
||||
"description": "Group multiple requests into a single request payload, see [Batch Requests](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests).\n\n*Please note that \"Try it out\" is not supported for this request.*",
|
||||
"tags": [
|
||||
"Batch Requests"
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "Batch request",
|
||||
"content": {
|
||||
"multipart/mixed;boundary=request-separator": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "--request-separator\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nGET People HTTP/1.1\nAccept: application/json\n\n\n--request-separator--"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Batch response",
|
||||
"content": {
|
||||
"multipart/mixed": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "--response-separator\nContent-Type: application/http\n\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{...}\n--response-separator--"
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"auth.example.Person": {
|
||||
"title": "Person",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth.example.Person-create": {
|
||||
"title": "Person (for create)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
]
|
||||
},
|
||||
"auth.example.Person-update": {
|
||||
"title": "Person (for update)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"description": "The structure of this object is service-specific"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"top": {
|
||||
"name": "$top",
|
||||
"in": "query",
|
||||
"description": "Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"example": 50
|
||||
},
|
||||
"skip": {
|
||||
"name": "$skip",
|
||||
"in": "query",
|
||||
"description": "Skip the first n items, see [Paging - Skip](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionskip)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"name": "$count",
|
||||
"in": "query",
|
||||
"description": "Include count of items, see [Count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount)",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"name": "$search",
|
||||
"in": "query",
|
||||
"description": "Search items by search phrases, see [Searching](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionsearch)",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"error": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"api_key": {
|
||||
"description": "Authentication via API key",
|
||||
"type": "apiKey",
|
||||
"name": "x-api-key",
|
||||
"in": "header"
|
||||
},
|
||||
"http_bearer": {
|
||||
"description": "HTTP authentication with bearer token",
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
},
|
||||
"oauth_authcode": {
|
||||
"description": "Authentication via OAuth2 with authorization code flow",
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"authorizationCode": {
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog",
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"oauth_clientcredentials": {
|
||||
"description": "Authentication via OAuth2 with client credentials flow",
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"clientCredentials": {
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"oauth_implicit": {
|
||||
"description": "Authentication via OAuth2 with implicit flow",
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"implicit": {
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog",
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"scopes": {
|
||||
"write:foo": "modify foo",
|
||||
"read:foo": "read foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"oauth_password": {
|
||||
"description": "Authentication via OAuth2 with resource owner password flow",
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"password": {
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"open_id": {
|
||||
"description": "Authentication via OpenID Connect",
|
||||
"type": "openIdConnect",
|
||||
"openIdConnectUrl": "https://example.com/openid/issuer/location"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"api_key": []
|
||||
},
|
||||
{
|
||||
"petstore_auth": [
|
||||
"write:pets",
|
||||
"read:pets"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Authorization.V1" Alias="Auth" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="auth.example" Alias="self">
|
||||
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
</EntityType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<EntitySet Name="People" EntityType="self.Person" />
|
||||
|
||||
<Annotation Term="Auth.SecuritySchemes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Authorization" String="api_key" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Authorization" String="petstore_auth" />
|
||||
<PropertyValue Property="RequiredScopes">
|
||||
<Collection>
|
||||
<String>write:pets</String>
|
||||
<String>read:pets</String>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
|
||||
<Annotation Term="Auth.Authorizations">
|
||||
<Collection>
|
||||
<Record Type="Auth.ApiKey">
|
||||
<PropertyValue Property="Name" String="api_key" />
|
||||
<PropertyValue Property="Description" String="Authentication via API key" />
|
||||
<PropertyValue Property="KeyName" String="x-api-key" />
|
||||
<PropertyValue Property="Location" EnumMember="Auth.KeyLocation/Header" />
|
||||
</Record>
|
||||
<Record Type="Auth.Http">
|
||||
<PropertyValue Property="Name" String="http_bearer" />
|
||||
<PropertyValue Property="Description" String="HTTP authentication with bearer token" />
|
||||
<PropertyValue Property="Scheme" String="bearer" />
|
||||
<PropertyValue Property="BearerFormat" String="JWT" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2AuthCode">
|
||||
<PropertyValue Property="Name" String="oauth_authcode" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with authorization code flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="AuthorizationUrl" String="https://example.com/api/oauth/dialog" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2ClientCredentials">
|
||||
<PropertyValue Property="Name" String="oauth_clientcredentials" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with client credentials flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2Implicit">
|
||||
<PropertyValue Property="Name" String="oauth_implicit" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with implicit flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="write:foo" />
|
||||
<PropertyValue Property="Description" String="modify foo" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="read:foo" />
|
||||
<PropertyValue Property="Description" String="read foo" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="AuthorizationUrl" String="https://example.com/api/oauth/dialog" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2Password">
|
||||
<PropertyValue Property="Name" String="oauth_password" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with resource owner password flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OpenIDConnect">
|
||||
<PropertyValue Property="Name" String="open_id" />
|
||||
<PropertyValue Property="Description" String="Authentication via OpenID Connect" />
|
||||
<PropertyValue Property="IssuerUrl" String="https://example.com/openid/issuer/location" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntityContainer>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,323 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
|
||||
<!-- TODO:
|
||||
containment
|
||||
- multi-level containment
|
||||
- containment with multi-part key
|
||||
- recursive containment - limit depth
|
||||
- NavigationRestrictions and containment
|
||||
-->
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Containment" Alias="self">
|
||||
|
||||
<EntityType Name="Whole">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<NavigationProperty Name="One" Type="self.Part" ContainsTarget="true" />
|
||||
<NavigationProperty Name="Many" Type="Collection(self.Part)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Part">
|
||||
<Key>
|
||||
<PropertyRef Name="index" />
|
||||
</Key>
|
||||
<Property Name="index" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="One" Type="self.SubPart" ContainsTarget="true" />
|
||||
<NavigationProperty Name="Many" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
<NavigationProperty Name="ManyReadListOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
<NavigationProperty Name="ManyReadByKeyOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="SubPart">
|
||||
<Key>
|
||||
<PropertyRef Name="One" />
|
||||
<PropertyRef Name="Two" />
|
||||
</Key>
|
||||
<Property Name="One" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Two" Type="Edm.Int32" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like this whole" />
|
||||
<Parameter Name="__it" Type="self.Whole" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like all of these wholes" />
|
||||
<Parameter Name="__it" Type="Collection(self.Whole)" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like this part" />
|
||||
<Parameter Name="__it" Type="self.Part" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like all of these parts" />
|
||||
<Parameter Name="__it" Type="Collection(self.Part)" />
|
||||
</Action>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like this whole" />
|
||||
<Parameter Name="__it" Type="self.Whole" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like these wholes" />
|
||||
<Parameter Name="__it" Type="Collection(self.Whole)" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like this part" />
|
||||
<Parameter Name="__it" Type="self.Part" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like these parts" />
|
||||
<Parameter Name="__it" Type="Collection(self.Part)" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<EntityType Name="Folder">
|
||||
<Key>
|
||||
<PropertyRef Name="Name" />
|
||||
</Key>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<NavigationProperty Name="Folders" Type="Collection(self.Folder)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
|
||||
|
||||
<EntitySet Name="Wholes" EntityType="self.Whole">
|
||||
<Annotation Term="Core.Description" String="List of containers" />
|
||||
</EntitySet>
|
||||
<Singleton Name="TheWhole" Type="self.Whole">
|
||||
<Annotation Term="Core.Description" String="Special container" />
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/Many" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports insert" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports delete" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any system query options" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Filterable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Sortable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="TopSupported" Bool="false" />
|
||||
<PropertyValue Property="SkipSupported" Bool="false" />
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="IndexableByKey" Bool="false" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<!-- TODO: turn off query options for GET collection -->
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
<PropertyValue Property="Description" String="Supports only read-by-key" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support `$select`" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Updatable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<EntitySet Name="Folders" EntityType="self.Folder">
|
||||
<Annotation Term="Core.Description" String="List of folders" />
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.Container/Wholes">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
|
||||
<PropertyValue Property="IndexableByKey">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<!-- TODO: turn off query options for GET collection -->
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable">
|
||||
<Bool>true</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Updatable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm"
|
||||
Version="4.01"
|
||||
>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Measures.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="ODataDemo">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
|
||||
<EntityType Name="Product" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String">
|
||||
<Annotation Term="Core.IsLanguageDependent" />
|
||||
</Property>
|
||||
<Property Name="ReleaseDate" Type="Edm.Date" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.Date" />
|
||||
<Property Name="Rating" Type="Edm.Int32" />
|
||||
<Property Name="Price" Type="Edm.Decimal">
|
||||
<Annotation Term="Org.OData.Measures.V1.ISOCurrency" Path="Currency" />
|
||||
</Property>
|
||||
<Property Name="Currency" Type="Edm.String" MaxLength="3" />
|
||||
<NavigationProperty Name="Category" Type="ODataDemo.Category" Nullable="false" Partner="Products" />
|
||||
<NavigationProperty Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Core.IsLanguageDependent" />
|
||||
</Property>
|
||||
<NavigationProperty Name="Products" Partner="Category" Type="Collection(ODataDemo.Product)">
|
||||
<OnDelete Action="Cascade" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Partner="Supplier" Type="Collection(ODataDemo.Product)" />
|
||||
</EntityType>
|
||||
<EntityType Name="Country">
|
||||
<Key>
|
||||
<PropertyRef Name="Code" />
|
||||
</Key>
|
||||
<Property Name="Code" Type="Edm.String" MaxLength="2" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="CountryName" Type="Edm.String" />
|
||||
<NavigationProperty Name="Country" Type="ODataDemo.Country">
|
||||
<ReferentialConstraint Property="CountryName" ReferencedProperty="Name" />
|
||||
</NavigationProperty>
|
||||
</ComplexType>
|
||||
<Function Name="ProductsByRating">
|
||||
<Parameter Name="Rating" Type="Edm.Int32" />
|
||||
<ReturnType Type="Collection(ODataDemo.Product)" />
|
||||
</Function>
|
||||
<EntityContainer Name="DemoService">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product">
|
||||
<NavigationPropertyBinding Path="Category" Target="Categories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category">
|
||||
<Annotation Term="Core.Description" String="Product Categories" />
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
<NavigationPropertyBinding Path="Address/Country" Target="Countries" />
|
||||
<Annotation Term="Core.OptimisticConcurrency">
|
||||
<Collection>
|
||||
<PropertyPath>Concurrency</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="MainSupplier" Type="ODataDemo.Supplier">
|
||||
<Annotation Term="Core.Description" String="Primary Supplier" />
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</Singleton>
|
||||
<EntitySet Name="Countries" EntityType="ODataDemo.Country" />
|
||||
<FunctionImport Name="ProductsByRating" EntitySet="Products" Function="ODataDemo.ProductsByRating" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"openapi": "3.0.2",
|
||||
"info": {
|
||||
"title": "OData CSDL document",
|
||||
"description": "",
|
||||
"version": ""
|
||||
},
|
||||
"paths": {},
|
||||
"components": {
|
||||
"schemas": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.01">
|
||||
<edmx:Reference Uri="http://host/service/$metadata">
|
||||
<edmx:Include Namespace="ODataDemo" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="http://somewhere/Vocabulary/V1">
|
||||
<edmx:Include Alias="Vocabulary1" Namespace="Some.Vocabulary.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="External.Annotations">
|
||||
<Annotations Target="ODataDemo.Supplier">
|
||||
<Annotation Term="Vocabulary1.EMail">
|
||||
<Null />
|
||||
</Annotation>
|
||||
<Annotation Term="Vocabulary1.AccountID" Path="ID" />
|
||||
<Annotation Term="Vocabulary1.Title" String="Supplier Info" />
|
||||
<Annotation Term="Vocabulary1.DisplayName">
|
||||
<Apply Function="odata.concat">
|
||||
<Path>Name</Path>
|
||||
<String> in </String>
|
||||
<Path>Address/CountryName</Path>
|
||||
</Apply>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product">
|
||||
<Annotation Term="Vocabulary1.Tags">
|
||||
<Collection>
|
||||
<String>MasterData</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,279 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<edmx:Edmx xmlns="http://docs.oasis-open.org/odata/ns/edm" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.01">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="descriptions" Alias="self">
|
||||
<Annotation Term="Core.SchemaVersion" String="0.0.1" />
|
||||
|
||||
|
||||
<EntityContainer Name="Default">
|
||||
|
||||
<EntitySet Name="entities" EntityType="self.entity">
|
||||
<Annotation Term="Core.Description" String="Entity Set - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Entity Set - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Query Entity Set - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Query Entity Set - LongDescription" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Entity by Key - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Entity by Key - LongDescription" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Create Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Create Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Delete Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Delete Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="entities_ext" EntityType="self.entity" />
|
||||
|
||||
<Singleton Name="single" Type="self.entity">
|
||||
<Annotation Term="Core.Description" String="Singleton - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Singleton - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Singleton - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Singleton - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Singleton - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Singleton - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<Singleton Name="single_ext" Type="self.entity" />
|
||||
|
||||
<ActionImport Action="self.action" Name="actionimport">
|
||||
<Annotation Term="Core.Description" String="Action Import - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Action Import - LongDescription" />
|
||||
</ActionImport>
|
||||
<ActionImport Action="self.action" Name="actionimport_ext" />
|
||||
<ActionImport Action="self.action" Name="actionimport_no_descriptions" />
|
||||
|
||||
<FunctionImport Function="self.function" Name="functionimport">
|
||||
<Annotation Term="Core.Description" String="Function Import - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Function Import - LongDescription" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Function="self.function" Name="functionimport_ext" />
|
||||
<FunctionImport Function="self.function" Name="functionimport_no_descriptions" />
|
||||
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.Default">
|
||||
<Annotation Term="Core.Description" String="Container - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Container - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/entities_ext">
|
||||
<Annotation Term="Core.Description" String="Entity Set Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Entity Set Ext - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Query Entity Set Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Query Entity Set Ext - LongDescription" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Entity Set by Key Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Entity Set by Key Ext - LongDescription" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Create Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Create Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Delete Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Delete Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/single_ext">
|
||||
<Annotation Term="Core.Description" String="Singleton Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Singleton Ext - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Singleton Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Singleton Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Singleton Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Singleton Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/actionimport_ext">
|
||||
<Annotation Term="Core.Description" String="Action Import Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Action Import Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/functionimport_ext">
|
||||
<Annotation Term="Core.Description" String="Function Import Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Function Import Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<EntityType Name="entity">
|
||||
<Annotation Term="Core.LongDescription" String="Entity Type - LongDescription" />
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="Edm.String" Nullable="false" MaxLength="70">
|
||||
<Annotation Term="Core.Description" String="Property - Description" />
|
||||
</Property>
|
||||
</EntityType>
|
||||
|
||||
<Annotations Target="self.entity">
|
||||
<Annotation Term="Core.Description" String="Entity Type - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.entity/id">
|
||||
<Annotation Term="Core.LongDescription" String="Property - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<Action Name="action">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload - Description" />
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload Parameter - Description" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload Return Type - Description" />
|
||||
</ReturnType>
|
||||
</Action>
|
||||
|
||||
<Annotations Target="self.action()">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action()/nonbinding">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Parameter Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action()/$ReturnType">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Return Type Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Action Name="action" IsBound="true">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload - LongDescription" />
|
||||
<Parameter Name="binding" Type="self.entity">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Binding Parameter - LongDescription - is ignored" />
|
||||
</Parameter>
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Non-Binding Parameter - LongDescription" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Return Type - LongDescription" />
|
||||
</ReturnType>
|
||||
</Action>
|
||||
|
||||
<Annotations Target="self.action(self.entity)">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/binding">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Binding Parameter Ext - Description - is ignored" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/nonbinding">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Nonbinding Parameter Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/$ReturnType">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Return Type Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<Function Name="function">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload - Description" />
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload Parameter - Description" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload Return Type - Description" />
|
||||
</ReturnType>
|
||||
</Function>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)/nonbinding">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Parameter Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)/$ReturnType">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Return Type Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Function Name="function" IsBound="true">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload - LongDescription" />
|
||||
<Parameter Name="binding" Type="self.entity">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Binding Parameter - LongDescription - is ignored" />
|
||||
</Parameter>
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Nonbinding Parameter - LongDescription" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Return Type - LongDescription" />
|
||||
</ReturnType>
|
||||
</Function>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/binding">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Binding Parameter Ext - Description - is ignored" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/nonbinding">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Nonbinding Parameter Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/$ReturnType">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Return Type Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,152 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="ReleaseDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Double" Nullable="false" />
|
||||
<NavigationProperty Name="Categories" Type="Collection(ODataDemo.Category)" Partner="Products" />
|
||||
<NavigationProperty Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" />
|
||||
<NavigationProperty Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" />
|
||||
</EntityType>
|
||||
<EntityType Name="FeaturedProduct" BaseType="ODataDemo.Product">
|
||||
<NavigationProperty Name="Advertisement" Type="ODataDemo.Advertisement" Partner="FeaturedProduct" />
|
||||
</EntityType>
|
||||
<EntityType Name="ProductDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Details" Type="Edm.String" />
|
||||
<NavigationProperty Name="Product" Type="ODataDemo.Product" Partner="ProductDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)" Partner="Categories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Location" Type="Edm.GeographyPoint" SRID="variable" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)" Partner="Supplier" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="Country" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail" Partner="Person" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer" BaseType="ODataDemo.Person">
|
||||
<Property Name="TotalExpense" Type="Edm.Decimal" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee" BaseType="ODataDemo.Person">
|
||||
<Property Name="EmployeeID" Type="Edm.Int64" Nullable="false" />
|
||||
<Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="Salary" Type="Edm.Single" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="PersonID" />
|
||||
</Key>
|
||||
<Property Name="PersonID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Age" Type="Edm.Byte" Nullable="false" />
|
||||
<Property Name="Gender" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="Phone" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
|
||||
<NavigationProperty Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="Advertisement" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<NavigationProperty Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement" />
|
||||
</EntityType>
|
||||
<Action Name="Discount" IsBound="true">
|
||||
<Parameter Name="product" Type="ODataDemo.Product" />
|
||||
<Parameter Name="discountPercentage" Type="Edm.Int32" Nullable="false" />
|
||||
<ReturnType Type="Edm.Double" Nullable="false" />
|
||||
</Action>
|
||||
<Action Name="IncreaseSalaries">
|
||||
<Parameter Name="percentage" Type="Edm.Decimal" Scale="variable" Nullable="false" />
|
||||
</Action>
|
||||
<EntityContainer Name="DemoService">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product">
|
||||
<NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement" Target="Advertisements" />
|
||||
<NavigationPropertyBinding Path="Categories" Target="Categories" />
|
||||
<NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
|
||||
<NavigationPropertyBinding Path="ProductDetail" Target="ProductDetails" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="ProductDetails" EntityType="ODataDemo.ProductDetail">
|
||||
<NavigationPropertyBinding Path="Product" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Persons" EntityType="ODataDemo.Person">
|
||||
<NavigationPropertyBinding Path="PersonDetail" Target="PersonDetails" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="PersonDetails" EntityType="ODataDemo.PersonDetail">
|
||||
<NavigationPropertyBinding Path="Person" Target="Persons" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement">
|
||||
<NavigationPropertyBinding Path="FeaturedProduct" Target="Products" />
|
||||
</EntitySet>
|
||||
<ActionImport Name="IncreaseSalaries" Action="ODataDemo.IncreaseSalaries" />
|
||||
</EntityContainer>
|
||||
<Annotations Target="ODataDemo.DemoService">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product">
|
||||
<Annotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product/Name">
|
||||
<Annotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.DemoService/Suppliers">
|
||||
<Annotation Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." />
|
||||
<Annotation Term="Org.OData.Publication.V1.PublisherId" String="MSFT" />
|
||||
<Annotation Term="Org.OData.Publication.V1.Keywords" String="Inventory, Supplier, Advertisers, Sales, Finance" />
|
||||
<Annotation Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.AttributionDescription" String="All rights reserved" />
|
||||
<Annotation Term="Org.OData.Publication.V1.DocumentationUrl " String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl" String="All rights reserved" />
|
||||
<Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl" String="http://www.odata.org/" />
|
||||
<Annotation Term="Org.OData.Publication.V1.LastModified" String="4/2/2013" />
|
||||
<Annotation Term="Org.OData.Publication.V1.ImageUrl " String="http://www.odata.org/" />
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,445 @@
|
|||
{
|
||||
"openapi": "3.0.2",
|
||||
"info": {
|
||||
"title": "Service for namespace key.aliases",
|
||||
"description": "This service is located at [https://localhost/service-root/](https://localhost/service-root/)\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[Category{bg:lightslategray}],[Category]++-[EntityInfo],[EntityInfo],[Categories%20{bg:lawngreen}]++-*>[Category])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:lightslategray}],[EntitySet/Singleton/Operation{bg:lawngreen}])",
|
||||
"version": ""
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://localhost/service-root"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "Categories"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/Categories": {
|
||||
"get": {
|
||||
"summary": "Get entities from Categories",
|
||||
"tags": [
|
||||
"Categories"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/skip"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/search"
|
||||
},
|
||||
{
|
||||
"name": "filter",
|
||||
"description": "Filter items by property values, see [Filtering](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionfilter)",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/count"
|
||||
},
|
||||
{
|
||||
"name": "orderby",
|
||||
"description": "Order items by property values, see [Sorting](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Info/ID",
|
||||
"Info/ID desc",
|
||||
"Info/Created",
|
||||
"Info/Created desc",
|
||||
"Name",
|
||||
"Name desc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Info",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entities",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"title": "Collection of Category",
|
||||
"properties": {
|
||||
"@count": {
|
||||
"$ref": "#/components/schemas/count"
|
||||
},
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/key.aliases.Category"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"summary": "Add new entity to Categories",
|
||||
"tags": [
|
||||
"Categories"
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "New entity",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/key.aliases.Category-create"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/key.aliases.Category"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/Categories({EntityInfoID})": {
|
||||
"parameters": [
|
||||
{
|
||||
"description": "ID within EntityInfo",
|
||||
"in": "path",
|
||||
"name": "EntityInfoID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Get entity from Categories by key",
|
||||
"tags": [
|
||||
"Categories"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "select",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"in": "query",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Info",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/key.aliases.Category"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update entity in Categories",
|
||||
"tags": [
|
||||
"Categories"
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "New property values",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/key.aliases.Category-update"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete entity from Categories",
|
||||
"tags": [
|
||||
"Categories"
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"key.aliases.Category": {
|
||||
"title": "Category",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Info": {
|
||||
"$ref": "#/components/schemas/key.aliases.EntityInfo"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"key.aliases.Category-create": {
|
||||
"title": "Category (for create)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Info": {
|
||||
"$ref": "#/components/schemas/key.aliases.EntityInfo-create"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"key.aliases.Category-update": {
|
||||
"title": "Category (for update)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Info": {
|
||||
"$ref": "#/components/schemas/key.aliases.EntityInfo-update"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"key.aliases.EntityInfo": {
|
||||
"title": "EntityInfo",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "ID within EntityInfo"
|
||||
},
|
||||
"Created": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2017-04-13T15:51:04Z",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"key.aliases.EntityInfo-create": {
|
||||
"title": "EntityInfo (for create)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "ID within EntityInfo"
|
||||
},
|
||||
"Created": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2017-04-13T15:51:04Z",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"key.aliases.EntityInfo-update": {
|
||||
"title": "EntityInfo (for update)",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "ID within EntityInfo"
|
||||
},
|
||||
"Created": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2017-04-13T15:51:04Z",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"description": "The structure of this object is service-specific"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"top": {
|
||||
"name": "top",
|
||||
"in": "query",
|
||||
"description": "Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"example": 50
|
||||
},
|
||||
"skip": {
|
||||
"name": "skip",
|
||||
"in": "query",
|
||||
"description": "Skip the first n items, see [Paging - Skip](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionskip)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"name": "count",
|
||||
"in": "query",
|
||||
"description": "Include count of items, see [Count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount)",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"name": "search",
|
||||
"in": "query",
|
||||
"description": "Search items by search phrases, see [Searching](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionsearch)",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"error": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
|
||||
<!-- TODO:
|
||||
- multi-part key
|
||||
- three path segments
|
||||
- navigation property segment
|
||||
-->
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="key.aliases" Alias="self">
|
||||
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="Info/ID" Alias="EntityInfoID" />
|
||||
</Key>
|
||||
<Property Name="Info" Type="self.EntityInfo" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
</EntityType>
|
||||
|
||||
<ComplexType Name="EntityInfo">
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false">
|
||||
<Annotation Term="Core.Description" String="ID within EntityInfo" />
|
||||
</Property>
|
||||
<Property Name="Created" Type="Edm.DateTimeOffset" />
|
||||
</ComplexType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
|
||||
|
||||
<EntitySet Name="Categories" EntityType="self.Category" />
|
||||
</EntityContainer>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,377 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"description": "OData OpenAPI Definitions",
|
||||
"definitions": {
|
||||
"Edm.ComplexType": {
|
||||
"type": "object"
|
||||
},
|
||||
"Edm.EntityType": {
|
||||
"type": "object"
|
||||
},
|
||||
"Edm.PrimitiveType": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"number",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"Edm.AnnotationPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"Edm.NavigationPropertyPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"Edm.PropertyPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"Edm.Binary": {
|
||||
"type": "string",
|
||||
"format": "base64url",
|
||||
"pattern": "^([A-Za-z0-9_-]{4})*([A-Za-z0-9_-]{3}[A-Za-z0-9_-]|[A-Za-z0-9_-]{2}[AEIMQUYcgkosw048]=?|[A-Za-z0-9_-][AQgw](==)?)?$"
|
||||
},
|
||||
"Edm.Byte": {
|
||||
"type": "integer",
|
||||
"format": "uint8",
|
||||
"minimum": 0,
|
||||
"maximum": 255
|
||||
},
|
||||
"Edm.Date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"
|
||||
},
|
||||
"Edm.DateTimeOffset": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$"
|
||||
},
|
||||
"Edm.Double": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"-INF",
|
||||
"INF",
|
||||
"NaN"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"Edm.Duration": {
|
||||
"type": "string",
|
||||
"format": "duration",
|
||||
"pattern": "^-?P([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+([.][0-9]+)?S)?)?$"
|
||||
},
|
||||
"Edm.Guid": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
||||
},
|
||||
"Edm.Int16": {
|
||||
"type": "integer",
|
||||
"format": "int16",
|
||||
"minimum": -32768,
|
||||
"maximum": 32767
|
||||
},
|
||||
"Edm.Int32": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": -2147483648,
|
||||
"maximum": 2147483647
|
||||
},
|
||||
"Edm.Int64": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"minimum": -9223372036854775808,
|
||||
"maximum": 9223372036854775807
|
||||
},
|
||||
"Edm.SByte": {
|
||||
"type": "integer",
|
||||
"format": "int8",
|
||||
"minimum": -128,
|
||||
"maximum": 127
|
||||
},
|
||||
"Edm.Single": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number",
|
||||
"format": "single"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"-INF",
|
||||
"INF",
|
||||
"NaN"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"Edm.Stream": {
|
||||
"type": "string",
|
||||
"format": "base64url"
|
||||
},
|
||||
"Edm.TimeOfDay": {
|
||||
"type": "string",
|
||||
"format": "time",
|
||||
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?$"
|
||||
},
|
||||
"Edm.Geography": {
|
||||
"$ref": "#/definitions/Edm.Geometry"
|
||||
},
|
||||
"Edm.GeographyPoint": {
|
||||
"$ref": "#/definitions/Edm.GeometryPoint"
|
||||
},
|
||||
"Edm.GeographyLineString": {
|
||||
"$ref": "#/definitions/Edm.GeometryLineString"
|
||||
},
|
||||
"Edm.GeographyPolygon": {
|
||||
"$ref": "#/definitions/Edm.GeometryPolygon"
|
||||
},
|
||||
"Edm.GeographyMultiPoint": {
|
||||
"$ref": "#/definitions/Edm.GeometryMultiPoint"
|
||||
},
|
||||
"Edm.GeographyMultiLineString": {
|
||||
"$ref": "#/definitions/Edm.GeometryMultiLineString"
|
||||
},
|
||||
"Edm.GeographyMultiPolygon": {
|
||||
"$ref": "#/definitions/Edm.GeometryMultiPolygon"
|
||||
},
|
||||
"Edm.GeographyCollection": {
|
||||
"$ref": "#/definitions/Edm.GeometryCollection"
|
||||
},
|
||||
"Edm.Geometry": {
|
||||
"type": "object",
|
||||
"@TODO": "This is not allowed in OpenAPI 2.0 - place it in description and reduce the structure to type property with enum list of all seven subtypes",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryPoint"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryLineString"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryPolygon"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryMultiPoint"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryMultiLineString"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryMultiPolygon"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Edm.GeometryCollection"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Edm.GeometryPoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Point"
|
||||
],
|
||||
"default": "Point"
|
||||
},
|
||||
"coordinates": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryLineString": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"LineString"
|
||||
]
|
||||
},
|
||||
"coordinates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
},
|
||||
"minItems": 2
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryPolygon": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"Polygon"
|
||||
]
|
||||
},
|
||||
"coordinates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
},
|
||||
"minItems": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryMultiPoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"MultiPoint"
|
||||
]
|
||||
},
|
||||
"coordinates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryMultiLineString": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"MultiLineString"
|
||||
]
|
||||
},
|
||||
"coordinates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
},
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryMultiPolygon": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"MultiPolygon"
|
||||
]
|
||||
},
|
||||
"coordinates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GeoJSON.position"
|
||||
},
|
||||
"minItems": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"coordinates"
|
||||
]
|
||||
},
|
||||
"Edm.GeometryCollection": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"GeometryCollection"
|
||||
]
|
||||
},
|
||||
"geometries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Edm.Geometry"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"GeoJSON.position": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"minItems": 2
|
||||
},
|
||||
"odata.error": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"$ref": "#/definitions/odata.error.main"
|
||||
}
|
||||
}
|
||||
},
|
||||
"odata.error.main": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/odata.error.detail"
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"description": "The structure of this object is service-specific"
|
||||
}
|
||||
}
|
||||
},
|
||||
"odata.error.detail": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
|
||||
<edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0"
|
||||
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
>
|
||||
<Schema Namespace="ODataDemo" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="false" />
|
||||
<Property Name="Description" Type="Edm.String" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="false" />
|
||||
<Property Name="ReleaseDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.DateTime" />
|
||||
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Double" Nullable="false" />
|
||||
<NavigationProperty Name="Categories" Relationship="ODataDemo.Product_Categories_Category_Products"
|
||||
ToRole="Category_Products" FromRole="Product_Categories" />
|
||||
<NavigationProperty Name="Supplier" Relationship="ODataDemo.Product_Supplier_Supplier_Products" ToRole="Supplier_Products"
|
||||
FromRole="Product_Supplier" />
|
||||
<NavigationProperty Name="ProductDetail" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
|
||||
ToRole="ProductDetail_Product" FromRole="Product_ProductDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="FeaturedProduct" BaseType="ODataDemo.Product">
|
||||
<NavigationProperty Name="Advertisement" Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
|
||||
ToRole="Advertisement_FeaturedProduct" FromRole="FeaturedProduct_Advertisement" />
|
||||
</EntityType>
|
||||
<EntityType Name="ProductDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Details" Type="Edm.String" />
|
||||
<NavigationProperty Name="Product" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
|
||||
ToRole="Product_ProductDetail" FromRole="ProductDetail_Product" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="true" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Categories_Category_Products"
|
||||
ToRole="Product_Categories" FromRole="Category_Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="true" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Supplier_Supplier_Products" ToRole="Product_Supplier"
|
||||
FromRole="Supplier_Products" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="Country" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="PersonDetail" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
|
||||
ToRole="PersonDetail_Person" FromRole="Person_PersonDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer" BaseType="ODataDemo.Person">
|
||||
<Property Name="TotalExpense" Type="Edm.Decimal" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee" BaseType="ODataDemo.Person">
|
||||
<Property Name="EmployeeID" Type="Edm.Int64" Nullable="false" />
|
||||
<Property Name="HireDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="Salary" Type="Edm.Single" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="PersonID" />
|
||||
</Key>
|
||||
<Property Name="PersonID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Age" Type="Edm.Byte" Nullable="false" />
|
||||
<Property Name="Gender" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="Phone" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
|
||||
<NavigationProperty Name="Person" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
|
||||
ToRole="Person_PersonDetail" FromRole="PersonDetail_Person" />
|
||||
</EntityType>
|
||||
<EntityType Name="Advertisement" m:HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="AirDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<NavigationProperty Name="FeaturedProduct" Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
|
||||
ToRole="FeaturedProduct_Advertisement" FromRole="Advertisement_FeaturedProduct" />
|
||||
</EntityType>
|
||||
<Association Name="Product_Categories_Category_Products">
|
||||
<End Type="ODataDemo.Category" Role="Category_Products" Multiplicity="*" />
|
||||
<End Type="ODataDemo.Product" Role="Product_Categories" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="Product_Supplier_Supplier_Products">
|
||||
<End Type="ODataDemo.Supplier" Role="Supplier_Products" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Product" Role="Product_Supplier" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="Product_ProductDetail_ProductDetail_Product">
|
||||
<End Type="ODataDemo.ProductDetail" Role="ProductDetail_Product" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Product" Role="Product_ProductDetail" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<Association Name="FeaturedProduct_Advertisement_Advertisement_FeaturedProduct">
|
||||
<End Type="ODataDemo.Advertisement" Role="Advertisement_FeaturedProduct" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.FeaturedProduct" Role="FeaturedProduct_Advertisement" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<Association Name="Person_PersonDetail_PersonDetail_Person">
|
||||
<End Type="ODataDemo.PersonDetail" Role="PersonDetail_Person" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Person" Role="Person_PersonDetail" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<EntityContainer Name="DemoService" m:IsDefaultEntityContainer="true">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product" />
|
||||
<EntitySet Name="ProductDetails" EntityType="ODataDemo.ProductDetail" />
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category" />
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier" />
|
||||
<EntitySet Name="Persons" EntityType="ODataDemo.Person" />
|
||||
<EntitySet Name="PersonDetails" EntityType="ODataDemo.PersonDetail" />
|
||||
<EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement" />
|
||||
<FunctionImport Name="GetProductsByRating" ReturnType="Collection(ODataDemo.Product)" EntitySet="Products"
|
||||
m:HttpMethod="GET"
|
||||
>
|
||||
<Parameter Name="rating" Type="Edm.Int16" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="Discount" ReturnType="Edm.Double" IsBindable="true" m:IsAlwaysBindable="true">
|
||||
<Parameter Name="product" Type="ODataDemo.Product" />
|
||||
<Parameter Name="discountPercentage" Type="Edm.Int32" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="IncreaseSalaries">
|
||||
<Parameter Name="percentage" Type="Edm.Int32" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<AssociationSet Name="Products_Advertisement_Advertisements" Association="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct">
|
||||
<End Role="FeaturedProduct_Advertisement" EntitySet="Products" />
|
||||
<End Role="Advertisement_FeaturedProduct" EntitySet="Advertisements" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_Categories_Categories" Association="ODataDemo.Product_Categories_Category_Products">
|
||||
<End Role="Product_Categories" EntitySet="Products" />
|
||||
<End Role="Category_Products" EntitySet="Categories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_Supplier_Suppliers" Association="ODataDemo.Product_Supplier_Supplier_Products">
|
||||
<End Role="Product_Supplier" EntitySet="Products" />
|
||||
<End Role="Supplier_Products" EntitySet="Suppliers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_ProductDetail_ProductDetails" Association="ODataDemo.Product_ProductDetail_ProductDetail_Product">
|
||||
<End Role="Product_ProductDetail" EntitySet="Products" />
|
||||
<End Role="ProductDetail_Product" EntitySet="ProductDetails" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Persons_PersonDetail_PersonDetails" Association="ODataDemo.Person_PersonDetail_PersonDetail_Person">
|
||||
<End Role="Person_PersonDetail" EntitySet="Persons" />
|
||||
<End Role="PersonDetail_Person" EntitySet="PersonDetails" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<Annotations Target="ODataDemo.DemoService">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product/Name">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.DemoService/Suppliers">
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PublisherId" String="MSFT" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.Keywords" String="Inventory, Supplier, Advertisers, Sales, Finance" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.AttributionDescription" String="All rights reserved" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.DocumentationUrl " String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.TermsOfUseUrl" String="All rights reserved" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl" String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.LastModified" String="4/2/2013" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.ImageUrl " String="http://www.odata.org/" />
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,56 @@
|
|||
# Convert OData 4.0x CSDL JSON or XML to OpenAPI 3.0.x
|
||||
|
||||
This script converts an OData Version 3.0, 4.0, or 4.01 [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) (`$metadata`) document into an [OpenAPI 3.0.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md) JSON document.
|
||||
|
||||
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).
|
||||
|
||||
_Note: this tool does not support OData 2.0, and it does not produce Swagger 2.0. If you need any of the 2.0 versions, use the [XSLT-based tool](../tools#transformjs-for-nodejs)._
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Clone or download this repository, go to its root folder and type
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
To install globally type
|
||||
```sh
|
||||
npm install -g
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Assuming you installed the script globally, and your XML metadata file is `MyMetadata.xml`, then
|
||||
```sh
|
||||
odata-openapi3 MyMetadata.xml
|
||||
```
|
||||
will create `MyMetadata.openapi.json` next to it.
|
||||
|
||||
Just type
|
||||
```sh
|
||||
odata-openapi3 -h
|
||||
```
|
||||
to get usage hints
|
||||
```
|
||||
Usage: odata-openapi3 <options> <source files>
|
||||
Options:
|
||||
--basePath base path (default: /service-root)
|
||||
-d, --diagram include YUML diagram
|
||||
-h, --help show this info
|
||||
--host host (default: localhost)
|
||||
-p, --pretty pretty-print JSON result
|
||||
--scheme scheme (default: http)
|
||||
-t, --target target file (default: source file base name + .openapi3.json)
|
||||
-u, --used-schemas-only produce only schemas that are actually used in
|
||||
```
|
||||
|
||||
If you installed the script locally, start it via
|
||||
```sh
|
||||
node lib/cli.js ...
|
||||
```
|
||||
|
||||
## Supported Annotations
|
||||
|
||||
The mapping can be fine-tuned via [annotations](../doc/Annotations.md) in the CSDL (`$metadata`) XML documents.
|
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
//console.dir(argv);
|
||||
|
||||
//TODO: what to require?
|
||||
const csdl = require('odata-csdl');
|
||||
const lib = require('./csdl2openapi');
|
||||
const minimist = require('minimist');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
var unknown = false;
|
||||
|
||||
var argv = minimist(process.argv.slice(2), {
|
||||
string: ["t", "target", "scheme", "host", "basePath"],
|
||||
boolean: ["d", "diagram", "h", "help", "p", "pretty", "u", "used-schemas-only"],
|
||||
alias: {
|
||||
d: "diagram",
|
||||
h: "help",
|
||||
p: "pretty",
|
||||
t: "target",
|
||||
u: "used-schemas-only"
|
||||
},
|
||||
default: {
|
||||
pretty: false
|
||||
},
|
||||
unknown: (arg) => {
|
||||
if (arg.substring(0, 1) == '-') {
|
||||
console.error('Unknown option: ' + arg);
|
||||
unknown = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (unknown || argv._.length == 0 || argv.h) {
|
||||
console.log(`Usage: odata-openapi3 <options> <source file>
|
||||
Options:
|
||||
--basePath base path (default: /service-root)
|
||||
-d, --diagram include YUML diagram
|
||||
-h, --help show this info
|
||||
--host host (default: localhost)
|
||||
-p, --pretty pretty-print JSON result
|
||||
--scheme scheme (default: http)
|
||||
-t, --target target file (default: source file basename + .openapi3.json)
|
||||
-u, --used-schemas-only produce only schemas that are actually used in operation objects`);
|
||||
} else {
|
||||
//TODO: further input parameters reserved for e.g. referenced CSDL documents
|
||||
// for (var i = 0; i < argv._.length; i++) {
|
||||
// convert(argv._[i]);
|
||||
// }
|
||||
convert(argv._[0]);
|
||||
}
|
||||
|
||||
function convert(source) {
|
||||
if (!fs.existsSync(source)) {
|
||||
console.error('Source file not found: ' + source);
|
||||
return;
|
||||
}
|
||||
|
||||
const text = fs.readFileSync(source, 'utf8');
|
||||
const json = text.startsWith('<') ? csdl.xml2json(text) : JSON.parse(text);
|
||||
if (json.$Version < '3.0') {
|
||||
console.error('Only OData Version 3.0 or greater is supported');
|
||||
return;
|
||||
}
|
||||
|
||||
const target = argv.target || (source.lastIndexOf('.') <= 0 ? source : source.substring(0, source.lastIndexOf('.'))) + '.openapi3.json';
|
||||
console.log(target);
|
||||
|
||||
const openapi = lib.csdl2openapi(
|
||||
json,
|
||||
{
|
||||
scheme: argv.scheme,
|
||||
host: argv.host,
|
||||
basePath: argv.basePath,
|
||||
diagram: argv.diagram
|
||||
});
|
||||
|
||||
if (argv.u) lib.deleteUnreferencedSchemas(openapi);
|
||||
|
||||
fs.writeFileSync(target, JSON.stringify(openapi, null, argv.pretty ? 4 : 0));
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const csdl = require('odata-csdl');
|
||||
const lib = require('./csdl2openapi');
|
||||
const fs = require('fs');
|
||||
|
||||
const exampleFolder = './examples/';
|
||||
|
||||
const basePath = {
|
||||
example: '/V4/OData/(S(nsga2k1tyctb0cn0ofcgcn4o))/OData.svc',
|
||||
Northwind: '/V4/Northwind/Northwind.svc',
|
||||
TripPin: '/V4/(S(cnbm44wtbc1v5bgrlek5lpcc))/TripPinServiceRW',
|
||||
'odata-rw-v3': '/V3/(S(1urrjxgkuh4r30yqim0hqrtj))/OData/OData.svc',
|
||||
'Northwind-V3': '/V3/Northwind/Northwind.svc'
|
||||
};
|
||||
|
||||
fs.readdirSync(exampleFolder).filter(fn => fn.endsWith('.xml')).forEach(xmlfile => {
|
||||
const example = xmlfile.substring(0, xmlfile.lastIndexOf('.'));
|
||||
console.log(xmlfile);
|
||||
|
||||
const xml = fs.readFileSync(exampleFolder + xmlfile, 'utf8');
|
||||
const json = csdl.xml2json(xml, false);
|
||||
|
||||
const openapi = lib.csdl2openapi(
|
||||
json,
|
||||
{
|
||||
scheme: 'https',
|
||||
host: basePath[example] ? 'services.odata.org' : 'localhost',
|
||||
basePath: basePath[example] || '/service-root',
|
||||
diagram: true
|
||||
}
|
||||
);
|
||||
|
||||
fs.writeFileSync(exampleFolder + example + '.openapi3.json', JSON.stringify(openapi, null, 4));
|
||||
});
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "odata-openapi",
|
||||
"version": "0.5.5",
|
||||
"description": "Convert OData CSDL XML or CSDL JSON to OpenAPI",
|
||||
"homepage": "https://github.com/oasis-tcs/odata-openapi/blob/master/lib/README.md",
|
||||
"bugs": "https://github.com/oasis-tcs/odata-openapi/issues",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/oasis-tcs/odata-openapi.git"
|
||||
},
|
||||
"files": [
|
||||
"lib/*"
|
||||
],
|
||||
"bin": {
|
||||
"odata-openapi3": "lib/cli.js"
|
||||
},
|
||||
"main": "lib/csdl2openapi.js",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.5",
|
||||
"odata-csdl": "^0.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^8.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node lib/transform.js",
|
||||
"test": "mocha",
|
||||
"watch": "mocha --watch"
|
||||
},
|
||||
"author": "",
|
||||
"license": "SEE LICENSE IN LICENSE.md"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
|||
<?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:edmx1="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:edm2="http://schemas.microsoft.com/ado/2008/09/edm"
|
||||
xmlns:edm3="http://schemas.microsoft.com/ado/2009/11/edm" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
>
|
||||
<!--
|
||||
This style sheet extracts the OData version numver from a $metadata document.
|
||||
|
||||
Latest version: https://github.com/oasis-tcs/odata-openapi/blob/master/tools/OData-Version.xsl
|
||||
|
||||
-->
|
||||
<xsl:output method="text" indent="yes" encoding="UTF-8" omit-xml-declaration="yes" />
|
||||
<xsl:strip-space elements="*" />
|
||||
|
||||
<xsl:template match="edmx:Edmx">
|
||||
<xsl:value-of select="@Version" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="edmx1:Edmx">
|
||||
<xsl:apply-templates select="edmx1:DataServices" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="edmx1:DataServices">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@m:MaxDataServiceVersion">
|
||||
<xsl:value-of select="@m:MaxDataServiceVersion" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>2.0</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*|node()" />
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,103 @@
|
|||
# XSLT-Based Tools
|
||||
|
||||
Tools for transforming [OData](http://www.odata.org) CSDL (`$metadata`) XML documents into [OpenAPI](https://github.com/OAI/OpenAPI-Specification) documents.
|
||||
|
||||
The core ingredient is the [`V4-CSDL-to-OpenAPI.xsl`](V4-CSDL-to-OpenAPI.xsl) transformation. It transforms OData CSDL XML Version 4.0 documents into either OpenAPI 3.0.0 or Swagger 2.0 documents.
|
||||
|
||||
OData CSDL XML documents conforming to one of the predecessor OData versions 2.0 or 3.0 can be transformed into OData 4.0 with the [`V2-to-V4-CSDL.xsl`](V2-to-V4-CSDL.xsl) transformation.
|
||||
|
||||
The two files [`transform.js`](transform.js) and [`transform.cmd`](transform.cmd) are wrapper scripts for Node.js and Windows Command.
|
||||
|
||||
The mapping can be fine-tuned via [annotations](../doc/Annotations.md) in the CSDL (`$metadata`) XML documents.
|
||||
|
||||
|
||||
## `transform.js` for Node.js
|
||||
|
||||
_Note: if you want to transform OData V3, V4, or V4.01 into OpenAPI 3.0.x, you better use the [pure Node.js-based tool](../lib)._
|
||||
|
||||
This script transforms one or more OData CSDL (`$metadata`) XML documents into OpenAPI JSON documents.
|
||||
|
||||
It uses [`xslt4node`](https://www.npmjs.com/package/xslt4node), which in turn needs [`node-gyp`](https://www.npmjs.com/package/node-gyp) and a [Java SE JDK](http://jdk.java.net).
|
||||
|
||||
### Installation
|
||||
|
||||
Install a [Java SE JDK](http://jdk.java.net) and make sure it is in the `PATH`
|
||||
|
||||
```sh
|
||||
javac -version
|
||||
```
|
||||
|
||||
Install `node-gyp` globally, following the [platform-specific installation instructions for `node-gyp`](https://github.com/nodejs/node-gyp/blob/master/README.md#installation).
|
||||
|
||||
|
||||
Clone or download this repository, go to the `tools` folder and type
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
To install globally type
|
||||
```sh
|
||||
npm install -g
|
||||
```
|
||||
### Usage
|
||||
|
||||
Assuming you installed the script globally and your metadata file is `MyMetadata.xml`, then
|
||||
```sh
|
||||
odata-openapi -dp MyMetadata.xml
|
||||
```
|
||||
will transform it into `MyMetadata.openapi.json` with a nice [yUML](https://yuml.me/) diagram and pretty-printed JSON.
|
||||
|
||||
|
||||
Just type
|
||||
```sh
|
||||
odata-openapi -h
|
||||
```
|
||||
to get usage hints
|
||||
```
|
||||
Usage: odata-openapi <options> <source files>
|
||||
Options:
|
||||
--basePath base path (default: /service-root)
|
||||
-d, --diagram include YUML diagram
|
||||
-h, --help show this info
|
||||
--host host (default: localhost)
|
||||
-o, --openapi-version 3.0.0 or 2.0 (default: 3.0.0)
|
||||
-p, --pretty pretty-print JSON result
|
||||
-r, --references include references to other files
|
||||
--scheme scheme (default: http)
|
||||
-t, --target target file (only useful with a single source file)
|
||||
-u, --used-schemas-only produce only schemas that are actually used in operation objects
|
||||
```
|
||||
|
||||
If you installed the script locally, start it via
|
||||
```sh
|
||||
node path_to_tools/transform.js ...
|
||||
```
|
||||
(replace `path_to_tools` with your local installation path).
|
||||
|
||||
|
||||
## `transform.cmd` for Windows Command
|
||||
|
||||
This script transforms a single OData CSDL (`$metadata`) XML documents into OpenAPI 3.0.0 JSON documents.
|
||||
|
||||
### Installation
|
||||
|
||||
The prerequisites are listed within [`transform.cmd`](transform.cmd). It's quite a lot:
|
||||
- [Java SE 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) is installed and in the `PATH`
|
||||
- [git](https://git-for-windows.github.io/) is installed and in the `PATH`
|
||||
- [Xalan](http://xalan.apache.org/xalan-j/downloads.html) is installed and `CLASSPATH` contains `xalan.jar` and `serializer.jar`
|
||||
- [YAJL](https://github.com/lloyd/yajl)'s `json_reformat` has been compiled and is in the `PATH`
|
||||
- [Node.js](https://nodejs.org/) is installed
|
||||
- [ajv-cli](https://www.npmjs.com/package/ajv-cli) is installed
|
||||
- https://github.com/OAI/OpenAPI-Specification is cloned next to this project
|
||||
|
||||
### Usage
|
||||
|
||||
In the `tools` folder execute
|
||||
```sh
|
||||
transform
|
||||
```
|
||||
|
||||
|
||||
## Supported Annotations
|
||||
|
||||
The mapping can be fine-tuned via [annotations](../doc/Annotations.md) in the CSDL (`$metadata`) XML documents.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "odata-openapi-xslt",
|
||||
"version": "0.0.1",
|
||||
"description": "OData to OpenAPI transformator",
|
||||
"homepage": "https://github.com/oasis-tcs/odata-openapi/tree/master/tools#transformjs-for-nodejs",
|
||||
"bugs": "https://github.com/oasis-tcs/odata-csdl-schemas/issues",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/oasis-tcs/odata-openapi.git",
|
||||
"directory": "tools"
|
||||
},
|
||||
"bin": {
|
||||
"odata-openapi": "transform.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.0",
|
||||
"xslt4node": "^0.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "SEE LICENSE IN ../LICENSE.md"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
@rem This script runs all test cases in the tests folder
|
||||
|
||||
for %%F in (tests\*.xml) do (
|
||||
call transform %%F /swagger
|
||||
)
|
||||
|
||||
endlocal
|
||||
exit /b
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,453 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="NorthwindModel" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="Description" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="Picture" Type="Edm.Binary" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category" />
|
||||
</EntityType>
|
||||
<EntityType Name="CustomerDemographic">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerTypeID" />
|
||||
</Key>
|
||||
<Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="CustomerDesc" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Customers" Type="Collection(NorthwindModel.Customer)" Partner="CustomerDemographics" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerID" />
|
||||
</Key>
|
||||
<Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Customer" />
|
||||
<NavigationProperty Name="CustomerDemographics" Type="Collection(NorthwindModel.CustomerDemographic)"
|
||||
Partner="Customers" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee">
|
||||
<Key>
|
||||
<PropertyRef Name="EmployeeID" />
|
||||
</Key>
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" />
|
||||
<Property Name="Title" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" />
|
||||
<Property Name="BirthDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="HireDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="HomePhone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Extension" Type="Edm.String" MaxLength="4" />
|
||||
<Property Name="Photo" Type="Edm.Binary" MaxLength="max" />
|
||||
<Property Name="Notes" Type="Edm.String" MaxLength="max" />
|
||||
<Property Name="ReportsTo" Type="Edm.Int32" />
|
||||
<Property Name="PhotoPath" Type="Edm.String" MaxLength="255" />
|
||||
<NavigationProperty Name="Employees1" Type="Collection(NorthwindModel.Employee)" Partner="Employee1" />
|
||||
<NavigationProperty Name="Employee1" Type="NorthwindModel.Employee" Partner="Employees1">
|
||||
<ReferentialConstraint Property="ReportsTo" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Employee" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Employees" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Detail">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<NavigationProperty Name="Order" Type="NorthwindModel.Order" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="OrderID" ReferencedProperty="OrderID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Product" Type="NorthwindModel.Product" Nullable="false" Partner="Order_Details">
|
||||
<ReferentialConstraint Property="ProductID" ReferencedProperty="ProductID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Order">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<NavigationProperty Name="Customer" Type="NorthwindModel.Customer" Partner="Orders">
|
||||
<ReferentialConstraint Property="CustomerID" ReferencedProperty="CustomerID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employee" Type="NorthwindModel.Employee" Partner="Orders">
|
||||
<ReferentialConstraint Property="EmployeeID" ReferencedProperty="EmployeeID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Order" />
|
||||
<NavigationProperty Name="Shipper" Type="NorthwindModel.Shipper" Partner="Orders">
|
||||
<ReferentialConstraint Property="ShipVia" ReferencedProperty="ShipperID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
|
||||
<ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product" />
|
||||
<NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
|
||||
<ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Region">
|
||||
<Key>
|
||||
<PropertyRef Name="RegionID" />
|
||||
</Key>
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Region" />
|
||||
</EntityType>
|
||||
<EntityType Name="Shipper">
|
||||
<Key>
|
||||
<PropertyRef Name="ShipperID" />
|
||||
</Key>
|
||||
<Property Name="ShipperID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Shipper" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="SupplierID" />
|
||||
</Key>
|
||||
<Property Name="SupplierID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Phone" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="Fax" Type="Edm.String" MaxLength="24" />
|
||||
<Property Name="HomePage" Type="Edm.String" MaxLength="max" />
|
||||
<NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Supplier" />
|
||||
</EntityType>
|
||||
<EntityType Name="Territory">
|
||||
<Key>
|
||||
<PropertyRef Name="TerritoryID" />
|
||||
</Key>
|
||||
<Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" />
|
||||
<Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
|
||||
<Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Region" Type="NorthwindModel.Region" Nullable="false" Partner="Territories">
|
||||
<ReferentialConstraint Property="RegionID" ReferencedProperty="RegionID" />
|
||||
</NavigationProperty>
|
||||
<NavigationProperty Name="Employees" Type="Collection(NorthwindModel.Employee)" Partner="Territories" />
|
||||
</EntityType>
|
||||
<EntityType Name="Alphabetical_list_of_product">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="SupplierID" Type="Edm.Int32" />
|
||||
<Property Name="CategoryID" Type="Edm.Int32" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="UnitsOnOrder" Type="Edm.Int16" />
|
||||
<Property Name="ReorderLevel" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Current_Product_List">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer_and_Suppliers_by_City">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="Relationship" />
|
||||
</Key>
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ContactName" Type="Edm.String" MaxLength="30" />
|
||||
<Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Invoice">
|
||||
<Key>
|
||||
<PropertyRef Name="CustomerName" />
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="Salesperson" />
|
||||
<PropertyRef Name="ShipperName" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Details_Extended">
|
||||
<Key>
|
||||
<PropertyRef Name="Discount" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
<PropertyRef Name="ProductID" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
<PropertyRef Name="Quantity" />
|
||||
<PropertyRef Name="UnitPrice" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
|
||||
<Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Discount" Type="Edm.Single" Nullable="false" />
|
||||
<Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Order_Subtotal">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Orders_Qry">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
|
||||
<Property Name="EmployeeID" Type="Edm.Int32" />
|
||||
<Property Name="OrderDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="ShipVia" Type="Edm.Int32" />
|
||||
<Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="ShipName" Type="Edm.String" MaxLength="40" />
|
||||
<Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="Address" Type="Edm.String" MaxLength="60" />
|
||||
<Property Name="City" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="Region" Type="Edm.String" MaxLength="15" />
|
||||
<Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
|
||||
<Property Name="Country" Type="Edm.String" MaxLength="15" />
|
||||
</EntityType>
|
||||
<EntityType Name="Product_Sales_for_1997">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_Above_Average_Price">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Products_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="Discontinued" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
|
||||
<Property Name="UnitsInStock" Type="Edm.Int16" />
|
||||
<Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_by_Category">
|
||||
<Key>
|
||||
<PropertyRef Name="CategoryID" />
|
||||
<PropertyRef Name="CategoryName" />
|
||||
<PropertyRef Name="ProductName" />
|
||||
</Key>
|
||||
<Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
|
||||
<Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Sales_Totals_by_Amount">
|
||||
<Key>
|
||||
<PropertyRef Name="CompanyName" />
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Quarter">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
<EntityType Name="Summary_of_Sales_by_Year">
|
||||
<Key>
|
||||
<PropertyRef Name="OrderID" />
|
||||
</Key>
|
||||
<Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
<Schema Namespace="ODataWebExperimental.Northwind.Model" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<EntityContainer Name="NorthwindEntities">
|
||||
<Annotation Term="Capabilities.KeyAsSegmentSupported" />
|
||||
<EntitySet Name="Categories" EntityType="NorthwindModel.Category">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic">
|
||||
<NavigationPropertyBinding Path="Customers" Target="Customers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Customers" EntityType="NorthwindModel.Customer">
|
||||
<NavigationPropertyBinding Path="CustomerDemographics" Target="CustomerDemographics" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Employees" EntityType="NorthwindModel.Employee">
|
||||
<NavigationPropertyBinding Path="Employees1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Employee1" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail">
|
||||
<NavigationPropertyBinding Path="Order" Target="Orders" />
|
||||
<NavigationPropertyBinding Path="Product" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Orders" EntityType="NorthwindModel.Order">
|
||||
<NavigationPropertyBinding Path="Customer" Target="Customers" />
|
||||
<NavigationPropertyBinding Path="Employee" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Shipper" Target="Shippers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Products" EntityType="NorthwindModel.Product">
|
||||
<NavigationPropertyBinding Path="Category" Target="Categories" />
|
||||
<NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
|
||||
<NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Regions" EntityType="NorthwindModel.Region">
|
||||
<NavigationPropertyBinding Path="Territories" Target="Territories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper">
|
||||
<NavigationPropertyBinding Path="Orders" Target="Orders" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Territories" EntityType="NorthwindModel.Territory">
|
||||
<NavigationPropertyBinding Path="Employees" Target="Employees" />
|
||||
<NavigationPropertyBinding Path="Region" Target="Regions" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_product" />
|
||||
<EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" />
|
||||
<EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" />
|
||||
<EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" />
|
||||
<EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" />
|
||||
<EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" />
|
||||
<EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" />
|
||||
<EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" />
|
||||
<EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" />
|
||||
<EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" />
|
||||
<EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" />
|
||||
<EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" />
|
||||
<EntitySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" />
|
||||
<EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,342 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Measures.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Microsoft.OData.SampleService.Models.TripPin" xmlns="http://docs.oasis-open.org/odata/ns/edm" >
|
||||
<EnumType Name="PersonGender">
|
||||
<Member Name="Male" Value="0" />
|
||||
<Member Name="Female" Value="1" />
|
||||
<Member Name="Unknown" Value="2" />
|
||||
</EnumType>
|
||||
<ComplexType Name="City">
|
||||
<Property Name="CountryRegion" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Region" Type="Edm.String" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="Location" OpenType="true">
|
||||
<Property Name="Address" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="City" Type="Microsoft.OData.SampleService.Models.TripPin.City" Nullable="false" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="EventLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
|
||||
<Property Name="BuildingInfo" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<ComplexType Name="AirportLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
|
||||
<Property Name="Loc" Type="Edm.GeographyPoint" Nullable="false" SRID="4326" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Photo" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="Id" />
|
||||
</Key>
|
||||
<Property Name="Id" Type="Edm.Int64" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes">
|
||||
<Collection>
|
||||
<String>image/jpeg</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntityType>
|
||||
<EntityType Name="Person" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="UserName" />
|
||||
</Key>
|
||||
<Property Name="UserName" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="FirstName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="LastName" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Emails" Type="Collection(Edm.String)" />
|
||||
<Property Name="AddressInfo" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Location)" />
|
||||
<Property Name="Gender" Type="Microsoft.OData.SampleService.Models.TripPin.PersonGender" />
|
||||
<Property Name="Concurrency" Type="Edm.Int64" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Computed" Bool="true" />
|
||||
</Property>
|
||||
<NavigationProperty Name="Friends" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)" />
|
||||
<NavigationProperty Name="Trips" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)"
|
||||
ContainsTarget="true" />
|
||||
<NavigationProperty Name="Photo" Type="Microsoft.OData.SampleService.Models.TripPin.Photo" />
|
||||
</EntityType>
|
||||
<EntityType Name="Airline">
|
||||
<Key>
|
||||
<PropertyRef Name="AirlineCode" />
|
||||
</Key>
|
||||
<Property Name="AirlineCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Airport">
|
||||
<Key>
|
||||
<PropertyRef Name="IcaoCode" />
|
||||
</Key>
|
||||
<Property Name="IcaoCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="IataCode" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Immutable" Bool="true" />
|
||||
</Property>
|
||||
<Property Name="Location" Type="Microsoft.OData.SampleService.Models.TripPin.AirportLocation" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PlanItem">
|
||||
<Key>
|
||||
<PropertyRef Name="PlanItemId" />
|
||||
</Key>
|
||||
<Property Name="PlanItemId" Type="Edm.Int32" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ConfirmationCode" Type="Edm.String" />
|
||||
<Property Name="StartsAt" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="EndsAt" Type="Edm.DateTimeOffset" />
|
||||
<Property Name="Duration" Type="Edm.Duration" />
|
||||
</EntityType>
|
||||
<EntityType Name="PublicTransportation" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem">
|
||||
<Property Name="SeatNumber" Type="Edm.String" />
|
||||
</EntityType>
|
||||
<EntityType Name="Flight" BaseType="Microsoft.OData.SampleService.Models.TripPin.PublicTransportation">
|
||||
<Property Name="FlightNumber" Type="Edm.String" Nullable="false" />
|
||||
<NavigationProperty Name="From" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
<NavigationProperty Name="To" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
<NavigationProperty Name="Airline" Type="Microsoft.OData.SampleService.Models.TripPin.Airline"
|
||||
Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Event" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem" OpenType="true">
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="OccursAt" Type="Microsoft.OData.SampleService.Models.TripPin.EventLocation" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Trip">
|
||||
<Key>
|
||||
<PropertyRef Name="TripId" />
|
||||
</Key>
|
||||
<Property Name="TripId" Type="Edm.Int32" Nullable="false">
|
||||
<Annotation Term="Org.OData.Core.V1.Permissions">
|
||||
<EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ShareId" Type="Edm.Guid" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Budget" Type="Edm.Single" Nullable="false">
|
||||
<Annotation Term="Org.OData.Measures.V1.ISOCurrency" String="USD" />
|
||||
<Annotation Term="Org.OData.Measures.V1.Scale" Int="2" />
|
||||
</Property>
|
||||
<Property Name="StartsAt" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="EndsAt" Type="Edm.DateTimeOffset" Nullable="false" />
|
||||
<Property Name="Tags" Type="Collection(Edm.String)" Nullable="false" />
|
||||
<NavigationProperty Name="Photos" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Photo)" />
|
||||
<NavigationProperty Name="PlanItems" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.PlanItem)"
|
||||
ContainsTarget="true" />
|
||||
</EntityType>
|
||||
<Function Name="GetFavoriteAirline" IsBound="true"
|
||||
EntitySetPath="person/Trips/PlanItems/Microsoft.OData.SampleService.Models.TripPin.Flight/Airline" IsComposable="true"
|
||||
>
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airline" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetInvolvedPeople" IsBound="true" IsComposable="true">
|
||||
<Parameter Name="trip" Type="Microsoft.OData.SampleService.Models.TripPin.Trip" Nullable="false" />
|
||||
<ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetFriendsTrips" IsBound="true" EntitySetPath="person/Friends/Trips" IsComposable="true">
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<Parameter Name="userName" Type="Edm.String" Nullable="false" />
|
||||
<ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)" Nullable="false" />
|
||||
</Function>
|
||||
<Function Name="GetNearestAirport" IsComposable="true">
|
||||
<Parameter Name="lat" Type="Edm.Double" Nullable="false" />
|
||||
<Parameter Name="lon" Type="Edm.Double" Nullable="false" />
|
||||
<ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false" />
|
||||
</Function>
|
||||
<Action Name="ResetDataSource" />
|
||||
<Action Name="ShareTrip" IsBound="true">
|
||||
<Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false" />
|
||||
<Parameter Name="userName" Type="Edm.String" Nullable="false" />
|
||||
<Parameter Name="tripId" Type="Edm.Int32" Nullable="false" />
|
||||
</Action>
|
||||
<EntityContainer Name="DefaultContainer">
|
||||
<EntitySet Name="Photos" EntityType="Microsoft.OData.SampleService.Models.TripPin.Photo">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Photos" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="People" EntityType="Microsoft.OData.SampleService.Models.TripPin.Person">
|
||||
<NavigationPropertyBinding Path="Friends" Target="People" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline"
|
||||
Target="Airlines" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Photo" Target="Photos" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos"
|
||||
Target="Photos" />
|
||||
<Annotation Term="Org.OData.Core.V1.OptimisticConcurrency">
|
||||
<Collection>
|
||||
<PropertyPath>Concurrency</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="People" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection>
|
||||
<NavigationPropertyPath>Trips</NavigationPropertyPath>
|
||||
<NavigationPropertyPath>Friends</NavigationPropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="Airlines" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airline">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airlines" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="Airports" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airport">
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airports" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="true" />
|
||||
<PropertyValue Property="UnsupportedExpressions">
|
||||
<EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
<PropertyValue Property="NonInsertableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable" Bool="false" />
|
||||
<PropertyValue Property="NonDeletableNavigationProperties">
|
||||
<Collection />
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="Me" Type="Microsoft.OData.SampleService.Models.TripPin.Person">
|
||||
<NavigationPropertyBinding Path="Friends" Target="People" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline"
|
||||
Target="Airlines" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To"
|
||||
Target="Airports" />
|
||||
<NavigationPropertyBinding Path="Photo" Target="Photos" />
|
||||
<NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos"
|
||||
Target="Photos" />
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Me" />
|
||||
</Singleton>
|
||||
<FunctionImport Name="GetNearestAirport" Function="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport"
|
||||
EntitySet="Airports" IncludeInServiceDocument="true"
|
||||
>
|
||||
<Annotation Term="Org.OData.Core.V1.ResourcePath" String="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport" />
|
||||
</FunctionImport>
|
||||
<ActionImport Name="ResetDataSource" Action="Microsoft.OData.SampleService.Models.TripPin.ResetDataSource" />
|
||||
<Annotation Term="Org.OData.Core.V1.Description" String="TripPin service is a sample service for OData V4." />
|
||||
</EntityContainer>
|
||||
<Annotations Target="Microsoft.OData.SampleService.Models.TripPin.DefaultContainer">
|
||||
<Annotation Term="Org.OData.Core.V1.DereferenceableIDs" Bool="true" />
|
||||
<Annotation Term="Org.OData.Core.V1.ConventionalIDs" Bool="true" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.ConformanceLevel">
|
||||
<EnumMember>Org.OData.Capabilities.V1.ConformanceLevelType/Advanced</EnumMember>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.SupportedFormats">
|
||||
<Collection>
|
||||
<String>application/json;odata.metadata=full;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
<String>application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
<String>application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
<Annotation Term="Org.OData.Capabilities.V1.AsynchronousRequestsSupported" Bool="true" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.BatchContinueOnErrorSupported" Bool="false" />
|
||||
<Annotation Term="Org.OData.Capabilities.V1.FilterFunctions">
|
||||
<Collection>
|
||||
<String>contains</String>
|
||||
<String>endswith</String>
|
||||
<String>startswith</String>
|
||||
<String>length</String>
|
||||
<String>indexof</String>
|
||||
<String>substring</String>
|
||||
<String>tolower</String>
|
||||
<String>toupper</String>
|
||||
<String>trim</String>
|
||||
<String>concat</String>
|
||||
<String>year</String>
|
||||
<String>month</String>
|
||||
<String>day</String>
|
||||
<String>hour</String>
|
||||
<String>minute</String>
|
||||
<String>second</String>
|
||||
<String>round</String>
|
||||
<String>floor</String>
|
||||
<String>ceiling</String>
|
||||
<String>cast</String>
|
||||
<String>isof</String>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "OData CSDL Document for namespace Supported.Annotations",
|
||||
"version": "",
|
||||
"description": "\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[SinglePartKey{bg:orange}])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:orange}],[EntitySet/Singleton/Operation{bg:dodgerblue}])"
|
||||
},
|
||||
"paths": {
|
||||
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Supported.Annotations.SinglePartKey": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pattern": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"pattern": "^.+$"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
]
|
||||
},
|
||||
"Maximum": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"title": "SinglePartKey"
|
||||
},
|
||||
"Supported.Annotations.SinglePartKey-create": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pattern": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"pattern": "^.+$"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
]
|
||||
},
|
||||
"Maximum": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
],
|
||||
"title": "SinglePartKey (for create)"
|
||||
},
|
||||
"Supported.Annotations.SinglePartKey-update": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Pattern": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"pattern": "^.+$"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
]
|
||||
},
|
||||
"Maximum": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"title": "SinglePartKey (for update)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "OData CSDL Document for namespace Supported.Annotations",
|
||||
"version": "",
|
||||
"description": "\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[SinglePartKey{bg:orange}])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:orange}],[EntitySet/Singleton/Operation{bg:dodgerblue}])"
|
||||
},
|
||||
"paths": {
|
||||
|
||||
},
|
||||
"definitions": {
|
||||
"Supported.Annotations.SinglePartKey": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pattern": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"pattern": "^.+$",
|
||||
"example": "string"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
],
|
||||
"example": "string"
|
||||
},
|
||||
"Maximum": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"title": "SinglePartKey"
|
||||
},
|
||||
"Supported.Annotations.SinglePartKey-create": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Pattern": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"pattern": "^.+$",
|
||||
"example": "string"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
],
|
||||
"example": "string"
|
||||
},
|
||||
"Maximum": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
],
|
||||
"title": "SinglePartKey (for create)"
|
||||
},
|
||||
"Supported.Annotations.SinglePartKey-update": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Pattern": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"pattern": "^.+$",
|
||||
"example": "string"
|
||||
},
|
||||
"AllowedValues": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"red",
|
||||
"green",
|
||||
"blue"
|
||||
],
|
||||
"example": "string"
|
||||
},
|
||||
"Maximum": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "decimal",
|
||||
"multipleOf": 1,
|
||||
"maximum": -1,
|
||||
"example": "-1"
|
||||
},
|
||||
"Minimum": {
|
||||
"type": "string",
|
||||
"format": "decimal",
|
||||
"multipleOf": 1.0e-5,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
"example": "1"
|
||||
},
|
||||
"Example": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "Hello World"
|
||||
}
|
||||
},
|
||||
"title": "SinglePartKey (for update)"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
|
||||
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml"
|
||||
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
|
||||
>
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml"
|
||||
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
|
||||
>
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices m:DataServiceVersion="2.0">
|
||||
<Schema Namespace="Supported.Annotations" Alias="self" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
|
||||
<EntityType Name="SinglePartKey">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Pattern" Type="Edm.String" />
|
||||
<Property Name="AllowedValues" Type="Edm.String" />
|
||||
<Property Name="Maximum" Type="Edm.Decimal" />
|
||||
<Property Name="Minimum" Type="Edm.Decimal" Scale="5" Nullable="false" />
|
||||
<Property Name="Example" Type="Edm.String" />
|
||||
</EntityType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<EntitySet Name="AllSet" EntityType="self.SinglePartKey" />
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/Pattern" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<Annotation Term="Validation.Pattern" String="^.+$" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/AllowedValues" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<Annotation Term="Validation.AllowedValues">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="red" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="green" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="blue" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/Maximum" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<Annotation Term="Validation.Maximum" Decimal="-1" />
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="-1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/Minimum" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<Annotation Term="Validation.Minimum" Decimal="0">
|
||||
<Annotation Term="Validation.Exclusive" Bool="true" />
|
||||
</Annotation>
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/Example" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Description" String="Primitive example value" />
|
||||
<PropertyValue Property="Value" String="Hello World" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,526 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
|
||||
<!-- TODO:
|
||||
minimum, maximum, exclusive, example, and multipleOf interact
|
||||
- inclusive maximum: take as example
|
||||
- inclusive minimum: take as example
|
||||
- exclusive maximum and no minimum: subtract 1 for example
|
||||
- exclusive minimum and no maximum: add 1 for example
|
||||
- both exclusive minimum and maximum: take average, round to multipleOf if present
|
||||
-->
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Supported.Annotations" Alias="self">
|
||||
<EntityType Name="SinglePartKey">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Pattern" Type="Edm.String">
|
||||
<Annotation Term="Validation.Pattern" String="^.+$" />
|
||||
</Property>
|
||||
<Property Name="PatternExt" Type="Edm.String" />
|
||||
<Property Name="AllowedValues" Type="Edm.String">
|
||||
<Annotation Term="Validation.AllowedValues">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="red" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="green" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="blue" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="AllowedValuesExt" Type="Edm.String" />
|
||||
<Property Name="Maximum" Type="Edm.Decimal" Precision="5" Scale="variable">
|
||||
<Annotation Term="Validation.Maximum" Decimal="0">
|
||||
<Annotation Term="Validation.Exclusive" Bool="true" />
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="MaximumExt" Type="Edm.Decimal" Scale="variable" />
|
||||
<Property Name="Minimum" Type="Edm.Decimal" Precision="5" Scale="2">
|
||||
<Annotation Term="Validation.Minimum" Decimal="1" />
|
||||
</Property>
|
||||
<Property Name="MinimumExt" Type="Edm.Decimal" Scale="5" Nullable="false" />
|
||||
<Property Name="Example" Type="Edm.String">
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Description" String="Primitive example value" />
|
||||
<PropertyValue Property="Value" String="Hello World" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Property>
|
||||
<Property Name="ExampleExt" Type="Edm.String" />
|
||||
<Property Name="Computed" Type="Edm.String">
|
||||
<Annotation Term="Core.Computed" />
|
||||
</Property>
|
||||
<Property Name="ComputedExt" Type="Edm.String" />
|
||||
<Property Name="Immutable" Type="Edm.String">
|
||||
<Annotation Term="Core.Immutable" />
|
||||
</Property>
|
||||
<Property Name="RequiredInFilter" Type="Edm.String" />
|
||||
<Property Name="ImmutableExt" Type="Edm.String" />
|
||||
<NavigationProperty Name="AllOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="AllMany" Type="Collection(self.TwoPartKey)" />
|
||||
<NavigationProperty Name="ReadOnlyOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="ReadOnlyMany" Type="Collection(self.TwoPartKey)" />
|
||||
<NavigationProperty Name="NothingOne" Type="self.TwoPartKey" />
|
||||
<NavigationProperty Name="NothingMany" Type="Collection(self.TwoPartKey)" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="TwoPartKey">
|
||||
<Key>
|
||||
<PropertyRef Name="One" />
|
||||
<PropertyRef Name="Two" />
|
||||
</Key>
|
||||
<Property Name="One" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Two" Type="Edm.Int32" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
|
||||
|
||||
<EntitySet Name="AllSet" EntityType="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RequiresFilter" Bool="true" />
|
||||
<PropertyValue Property="RequiredProperties">
|
||||
<Collection>
|
||||
<PropertyPath>RequiredInFilter</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Example</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="NoNavigationSet" EntityType="self.SinglePartKey">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="OneNavigationSet" EntityType="self.SinglePartKey">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="AllMany" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/Recursive" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="ReadListOnlySet" EntityType="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any query options" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<!-- Note: "not indexable by key" implies "no update, no delete" -->
|
||||
<Annotation Term="Capabilities.IndexableByKey" Bool="false" />
|
||||
<Annotation Term="Capabilities.SkipSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.TopSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.CountRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Countable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Filterable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Searchable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Sortable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="AllSingleton" Type="self.SinglePartKey">
|
||||
<Annotation Term="Core.Description" String="First Singleton" />
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
</Singleton>
|
||||
<Singleton Name="ReadOnlySingleton" Type="self.SinglePartKey">
|
||||
<NavigationPropertyBinding Path="AllOne" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="AllMany" Target="TwoAllSet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyOne" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="ReadOnlyMany" Target="TwoReadOnlySet" />
|
||||
<NavigationPropertyBinding Path="NothingOne" Target="TwoNothingSet" />
|
||||
<NavigationPropertyBinding Path="NothingMany" Target="TwoNothingSet" />
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support `$select` and `$expand`" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="AllMany" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>One</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="ReadOnlyMany" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="NothingMany" />
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<EntitySet Name="TwoAllSet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoReadOnlySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoReadOnlyByKeySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoWriteOnlySet" EntityType="self.TwoPartKey" />
|
||||
<EntitySet Name="TwoNothingSet" EntityType="self.TwoPartKey" />
|
||||
<Singleton Name="TwoWriteOnlySingleton" Type="self.TwoPartKey" />
|
||||
<Singleton Name="TwoNothingSingleton" Type="self.TwoPartKey" />
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/PatternExt">
|
||||
<Annotation Term="Validation.Pattern" String="^.+$" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/AllowedValuesExt">
|
||||
<Annotation Term="Validation.AllowedValues">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="red" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="green" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Value" String="blue" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/MaximumExt">
|
||||
<Annotation Term="Validation.Maximum" Decimal="-1" />
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="-1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/MinimumExt">
|
||||
<Annotation Term="Validation.Minimum" Decimal="0">
|
||||
<Annotation Term="Validation.Exclusive" Bool="true" />
|
||||
</Annotation>
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Value" Decimal="1" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ExampleExt">
|
||||
<Annotation Term="Core.Example">
|
||||
<Record Type="Core.PrimitiveExampleValue">
|
||||
<PropertyValue Property="Description" String="Primitive example value" />
|
||||
<PropertyValue Property="Value" String="Hello external World" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ComputedExt">
|
||||
<Annotation Term="Core.Computed" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.SinglePartKey/ImmutableExt">
|
||||
<Annotation Term="Core.Immutable" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoAllSet">
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="NonSortableProperties">
|
||||
<Collection>
|
||||
<PropertyPath>Two</PropertyPath>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<!-- redundant, just to test the conditional logic -->
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="true" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoReadOnlySet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any query options" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SkipSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.TopSupported" Bool="false" />
|
||||
<Annotation Term="Capabilities.CountRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Countable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Filterable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Sortable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Searchable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Supported" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ExpandRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Expandable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoReadOnlyByKeySet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Deletable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoWriteOnlySet">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports insert" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports delete" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoNothingSet">
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Insertable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.IndexableByKey" Bool="false" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoWriteOnlySingleton">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Container/TwoNothingSingleton">
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Readable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Bool="false" Property="Updatable" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,514 @@
|
|||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Service for namespace auth.example",
|
||||
"version": "",
|
||||
"description": "This service is located at [https://localhost/service-root/](https://localhost/service-root/)\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[Person{bg:orange}],[People{bg:dodgerblue}]++-*>[Person])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:orange}],[EntitySet/Singleton/Operation{bg:dodgerblue}])"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://localhost/service-root"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "People"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/People": {
|
||||
"get": {
|
||||
"summary": "Get entities from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/skip"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/search"
|
||||
},
|
||||
{
|
||||
"name": "$filter",
|
||||
"in": "query",
|
||||
"description": "Filter items by property values, see [Filtering](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionfilter)",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/count"
|
||||
},
|
||||
{
|
||||
"name": "$orderby",
|
||||
"in": "query",
|
||||
"description": "Order items by property values, see [Sorting](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby)",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"ID desc",
|
||||
"Name",
|
||||
"Name desc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "$select",
|
||||
"in": "query",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entities",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"title": "Collection of Person",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"$ref": "#/components/schemas/count"
|
||||
},
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"summary": "Add new entity to People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "New entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person-create"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/People('{ID}')": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "key: ID",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Get entity from People by key",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "$select",
|
||||
"in": "query",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"explode": false,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update entity in People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "New property values",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/auth.example.Person-update"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete entity from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/$batch": {
|
||||
"post": {
|
||||
"summary": "Send a group of requests",
|
||||
"description": "Group multiple requests into a single request payload, see [Batch Requests](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests).\n\n*Please note that \"Try it out\" is not supported for this request.*",
|
||||
"tags": [
|
||||
"Batch Requests"
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "Batch request",
|
||||
"content": {
|
||||
"multipart/mixed;boundary=request-separator": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "--request-separator\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nGET People HTTP/1.1\nAccept: application/json\n\n\n--request-separator--"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Batch response",
|
||||
"content": {
|
||||
"multipart/mixed": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "--response-separator\nContent-Type: application/http\n\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{...}\n--response-separator--"
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"auth.example.Person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"title": "Person"
|
||||
},
|
||||
"auth.example.Person-create": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
],
|
||||
"title": "Person (for create)"
|
||||
},
|
||||
"auth.example.Person-update": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"title": "Person (for update)"
|
||||
},
|
||||
"count": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"description": "The structure of this object is service-specific"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"top": {
|
||||
"name": "$top",
|
||||
"in": "query",
|
||||
"description": "Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"example": 50
|
||||
},
|
||||
"skip": {
|
||||
"name": "$skip",
|
||||
"in": "query",
|
||||
"description": "Skip the first n items, see [Paging - Skip](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionskip)",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"name": "$count",
|
||||
"in": "query",
|
||||
"description": "Include count of items, see [Count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount)",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"name": "$search",
|
||||
"in": "query",
|
||||
"description": "Search items by search phrases, see [Searching](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionsearch)",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"error": {
|
||||
"description": "Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"api_key": {
|
||||
"type": "apiKey",
|
||||
"name": "x-api-key",
|
||||
"in": "header",
|
||||
"description": "Authentication via API key"
|
||||
},
|
||||
"http_bearer": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT",
|
||||
"description": "HTTP authentication with bearer token"
|
||||
},
|
||||
"oauth_authcode": {
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"authorizationCode": {
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog",
|
||||
"tokenUrl": "https://example.com/api/oauth/token"
|
||||
}
|
||||
},
|
||||
"description": "Authentication via OAuth2 with authorization code flow"
|
||||
},
|
||||
"oauth_clientcredentials": {
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"clientCredentials": {
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"tokenUrl": "https://example.com/api/oauth/token"
|
||||
}
|
||||
},
|
||||
"description": "Authentication via OAuth2 with client credentials flow"
|
||||
},
|
||||
"oauth_implicit": {
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"implicit": {
|
||||
"scopes": {
|
||||
"write:foo": "modify foo",
|
||||
"read:foo": "read foo"
|
||||
},
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog"
|
||||
}
|
||||
},
|
||||
"description": "Authentication via OAuth2 with implicit flow"
|
||||
},
|
||||
"oauth_password": {
|
||||
"type": "oauth2",
|
||||
"flows": {
|
||||
"password": {
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"refreshUrl": "https://example.com/api/oauth/refresh",
|
||||
"tokenUrl": "https://example.com/api/oauth/token"
|
||||
}
|
||||
},
|
||||
"description": "Authentication via OAuth2 with resource owner password flow"
|
||||
},
|
||||
"open_id": {
|
||||
"type": "openIdConnect",
|
||||
"openIdConnectUrl": "https://example.com/openid/issuer/location",
|
||||
"description": "Authentication via OpenID Connect"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"api_key": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"petstore_auth": [
|
||||
"write:pets",
|
||||
"read:pets"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,462 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Service for namespace auth.example",
|
||||
"version": "",
|
||||
"description": "This service is located at [https://localhost/service-root/](https://localhost/service-root/)\n\n## Entity Data Model\n![ER Diagram](https://yuml.me/diagram/class/[Person{bg:orange}],[People{bg:dodgerblue}]++-*>[Person])\n\n### Legend\n![Legend](https://yuml.me/diagram/plain;dir:TB;scale:60/class/[External.Type{bg:whitesmoke}],[ComplexType],[EntityType{bg:orange}],[EntitySet/Singleton/Operation{bg:dodgerblue}])"
|
||||
},
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"host": "localhost",
|
||||
"basePath": "/service-root",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "People"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/People": {
|
||||
"get": {
|
||||
"summary": "Get entities from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/skip"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/search"
|
||||
},
|
||||
{
|
||||
"name": "$filter",
|
||||
"in": "query",
|
||||
"description": "Filter items by property values, see [Filtering](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionfilter)",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/count"
|
||||
},
|
||||
{
|
||||
"name": "$orderby",
|
||||
"in": "query",
|
||||
"description": "Order items by property values, see [Sorting](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby)",
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"ID desc",
|
||||
"Name",
|
||||
"Name desc"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "$select",
|
||||
"in": "query",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entities",
|
||||
"schema": {
|
||||
"title": "Collection of Person",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"$ref": "#/definitions/count"
|
||||
},
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/auth.example.Person"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"summary": "Add new entity to People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Person",
|
||||
"in": "body",
|
||||
"description": "New entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.example.Person-create"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.example.Person"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/People('{ID}')": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ID",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "key: ID",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"summary": "Get entity from People by key",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "$select",
|
||||
"in": "query",
|
||||
"description": "Select properties to be returned, see [Select](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionselect)",
|
||||
"type": "array",
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID",
|
||||
"Name"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Retrieved entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.example.Person"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update entity in People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Person",
|
||||
"in": "body",
|
||||
"description": "New property values",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.example.Person-update"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete entity from People",
|
||||
"tags": [
|
||||
"People"
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/$batch": {
|
||||
"post": {
|
||||
"summary": "Send a group of requests",
|
||||
"description": "Group multiple requests into a single request payload, see [Batch Requests](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_BatchRequests).",
|
||||
"tags": [
|
||||
"Batch Requests"
|
||||
],
|
||||
"consumes": [
|
||||
"multipart/mixed;boundary=request-separator"
|
||||
],
|
||||
"produces": [
|
||||
"multipart/mixed"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "requestBody",
|
||||
"in": "body",
|
||||
"description": "Batch request",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "--request-separator\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nGET People HTTP/1.1\nAccept: application/json\n\n\n--request-separator--"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Batch response",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "--response-separator\nContent-Type: application/http\n\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{...}\n--response-separator--"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"auth.example.Person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "string"
|
||||
}
|
||||
},
|
||||
"title": "Person"
|
||||
},
|
||||
"auth.example.Person-create": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ID": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ID"
|
||||
],
|
||||
"title": "Person (for create)"
|
||||
},
|
||||
"auth.example.Person-update": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"example": "string"
|
||||
}
|
||||
},
|
||||
"title": "Person (for update)"
|
||||
},
|
||||
"count": {
|
||||
"type": "string",
|
||||
"description": "The number of entities in the collection. Available when using the [$count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount) query option."
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"type": "object",
|
||||
"description": "The structure of this object is service-specific"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"top": {
|
||||
"name": "$top",
|
||||
"in": "query",
|
||||
"description": "Show only the first n items, see [Paging - Top](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop)",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"skip": {
|
||||
"name": "$skip",
|
||||
"in": "query",
|
||||
"description": "Skip the first n items, see [Paging - Skip](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionskip)",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"count": {
|
||||
"name": "$count",
|
||||
"in": "query",
|
||||
"description": "Include count of items, see [Count](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptioncount)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"search": {
|
||||
"name": "$search",
|
||||
"in": "query",
|
||||
"description": "Search items by search phrases, see [Searching](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionsearch)",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"error": {
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"api_key": {
|
||||
"type": "apiKey",
|
||||
"name": "x-api-key",
|
||||
"in": "header",
|
||||
"description": "Authentication via API key"
|
||||
},
|
||||
"http_bearer": {
|
||||
"type": "basic",
|
||||
"description": "bearer scheme not supported by Swagger 2.0"
|
||||
},
|
||||
"oauth_authcode": {
|
||||
"type": "oauth2",
|
||||
"flow": "accessCode",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog",
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"description": "Authentication via OAuth2 with authorization code flow"
|
||||
},
|
||||
"oauth_clientcredentials": {
|
||||
"type": "oauth2",
|
||||
"flow": "application",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"description": "Authentication via OAuth2 with client credentials flow"
|
||||
},
|
||||
"oauth_implicit": {
|
||||
"type": "oauth2",
|
||||
"flow": "implicit",
|
||||
"scopes": {
|
||||
"write:foo": "modify foo",
|
||||
"read:foo": "read foo"
|
||||
},
|
||||
"authorizationUrl": "https://example.com/api/oauth/dialog",
|
||||
"description": "Authentication via OAuth2 with implicit flow"
|
||||
},
|
||||
"oauth_password": {
|
||||
"type": "oauth2",
|
||||
"flow": "password",
|
||||
"scopes": {
|
||||
"do:something": "do something"
|
||||
},
|
||||
"tokenUrl": "https://example.com/api/oauth/token",
|
||||
"description": "Authentication via OAuth2 with resource owner password flow"
|
||||
},
|
||||
"open_id": {
|
||||
"type": "basic",
|
||||
"description": "openIdConnect not supported by Swagger 2.0"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"api_key": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"petstore_auth": [
|
||||
"write:pets",
|
||||
"read:pets"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Authorization.V1" Alias="Auth" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="auth.example" Alias="self">
|
||||
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
</EntityType>
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<EntitySet Name="People" EntityType="self.Person" />
|
||||
|
||||
<Annotation Term="Auth.SecuritySchemes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Authorization" String="api_key" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Authorization" String="petstore_auth" />
|
||||
<PropertyValue Property="RequiredScopes">
|
||||
<Collection>
|
||||
<String>write:pets</String>
|
||||
<String>read:pets</String>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
|
||||
<Annotation Term="Auth.Authorizations">
|
||||
<Collection>
|
||||
<Record Type="Auth.ApiKey">
|
||||
<PropertyValue Property="Name" String="api_key" />
|
||||
<PropertyValue Property="Description" String="Authentication via API key" />
|
||||
<PropertyValue Property="KeyName" String="x-api-key" />
|
||||
<PropertyValue Property="Location" EnumMember="Auth.KeyLocation/Header" />
|
||||
</Record>
|
||||
<Record Type="Auth.Http">
|
||||
<PropertyValue Property="Name" String="http_bearer" />
|
||||
<PropertyValue Property="Description" String="HTTP authentication with bearer token" />
|
||||
<PropertyValue Property="Scheme" String="bearer" />
|
||||
<PropertyValue Property="BearerFormat" String="JWT" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2AuthCode">
|
||||
<PropertyValue Property="Name" String="oauth_authcode" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with authorization code flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="AuthorizationUrl" String="https://example.com/api/oauth/dialog" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2ClientCredentials">
|
||||
<PropertyValue Property="Name" String="oauth_clientcredentials" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with client credentials flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2Implicit">
|
||||
<PropertyValue Property="Name" String="oauth_implicit" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with implicit flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="write:foo" />
|
||||
<PropertyValue Property="Description" String="modify foo" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="read:foo" />
|
||||
<PropertyValue Property="Description" String="read foo" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="AuthorizationUrl" String="https://example.com/api/oauth/dialog" />
|
||||
</Record>
|
||||
<Record Type="Auth.OAuth2Password">
|
||||
<PropertyValue Property="Name" String="oauth_password" />
|
||||
<PropertyValue Property="Description" String="Authentication via OAuth2 with resource owner password flow" />
|
||||
<PropertyValue Property="Scopes">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="Scope" String="do:something" />
|
||||
<PropertyValue Property="Description" String="do something" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="RefreshUrl" String="https://example.com/api/oauth/refresh" />
|
||||
<PropertyValue Property="TokenUrl" String="https://example.com/api/oauth/token" />
|
||||
</Record>
|
||||
<Record Type="Auth.OpenIDConnect">
|
||||
<PropertyValue Property="Name" String="open_id" />
|
||||
<PropertyValue Property="Description" String="Authentication via OpenID Connect" />
|
||||
<PropertyValue Property="IssuerUrl" String="https://example.com/openid/issuer/location" />
|
||||
</Record>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntityContainer>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,323 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.01">
|
||||
<!-- TODO:
|
||||
containment
|
||||
- multi-level containment
|
||||
- containment with multi-part key
|
||||
- recursive containment - limit depth
|
||||
- NavigationRestrictions and containment
|
||||
-->
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Validation.V1" Alias="Validation" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="Containment" Alias="self">
|
||||
|
||||
<EntityType Name="Whole">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<NavigationProperty Name="One" Type="self.Part" ContainsTarget="true" />
|
||||
<NavigationProperty Name="Many" Type="Collection(self.Part)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="Part">
|
||||
<Key>
|
||||
<PropertyRef Name="index" />
|
||||
</Key>
|
||||
<Property Name="index" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="One" Type="self.SubPart" ContainsTarget="true" />
|
||||
<NavigationProperty Name="Many" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
<NavigationProperty Name="ManyReadListOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
<NavigationProperty Name="ManyReadByKeyOnly" Type="Collection(self.SubPart)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
<EntityType Name="SubPart">
|
||||
<Key>
|
||||
<PropertyRef Name="One" />
|
||||
<PropertyRef Name="Two" />
|
||||
</Key>
|
||||
<Property Name="One" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Two" Type="Edm.Int32" Nullable="false" />
|
||||
</EntityType>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like this whole" />
|
||||
<Parameter Name="__it" Type="self.Whole" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like all of these wholes" />
|
||||
<Parameter Name="__it" Type="Collection(self.Whole)" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like this part" />
|
||||
<Parameter Name="__it" Type="self.Part" />
|
||||
</Action>
|
||||
|
||||
<Action Name="Like" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="I like all of these parts" />
|
||||
<Parameter Name="__it" Type="Collection(self.Part)" />
|
||||
</Action>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like this whole" />
|
||||
<Parameter Name="__it" Type="self.Whole" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like these wholes" />
|
||||
<Parameter Name="__it" Type="Collection(self.Whole)" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like this part" />
|
||||
<Parameter Name="__it" Type="self.Part" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<Function Name="Likes" IsBound="true">
|
||||
<Annotation Term="Core.Description" String="How many like these parts" />
|
||||
<Parameter Name="__it" Type="Collection(self.Part)" />
|
||||
<ReturnType Type="Edm.Int32" />
|
||||
</Function>
|
||||
|
||||
<EntityType Name="Folder">
|
||||
<Key>
|
||||
<PropertyRef Name="Name" />
|
||||
</Key>
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String" />
|
||||
<NavigationProperty Name="Folders" Type="Collection(self.Folder)" ContainsTarget="true" />
|
||||
</EntityType>
|
||||
|
||||
|
||||
<EntityContainer Name="Container">
|
||||
<Annotation Term="Capabilities.BatchSupported" Bool="false" />
|
||||
|
||||
<EntitySet Name="Wholes" EntityType="self.Whole">
|
||||
<Annotation Term="Core.Description" String="List of containers" />
|
||||
</EntitySet>
|
||||
<Singleton Name="TheWhole" Type="self.Whole">
|
||||
<Annotation Term="Core.Description" String="Special container" />
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/Many" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports insert" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports update" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports delete" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Supports only read-list" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support any system query options" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="FilterRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Filterable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SearchRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Searchable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SortRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Sortable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="TopSupported" Bool="false" />
|
||||
<PropertyValue Property="SkipSupported" Bool="false" />
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="IndexableByKey" Bool="false" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<!-- TODO: turn off query options for GET collection -->
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="false" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable" Bool="true" />
|
||||
<PropertyValue Property="Description" String="Supports only read-by-key" />
|
||||
<PropertyValue Property="LongDescription" String="Does not support `$select`" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Updatable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable" Bool="false" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<EntitySet Name="Folders" EntityType="self.Folder">
|
||||
<Annotation Term="Core.Description" String="List of folders" />
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.Container/Wholes">
|
||||
<Annotation Term="Capabilities.NavigationRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="RestrictedProperties">
|
||||
<Collection>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadListOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
<!-- TOD: this is odd, remove Navigability above or set it to Single -->
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="One/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="Navigability" EnumMember="Capabilities.NavigationType/None" />
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadListOnly" />
|
||||
<PropertyValue Property="IndexableByKey">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<!-- TODO: turn off query options for GET collection -->
|
||||
</Record>
|
||||
<Record>
|
||||
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Many/ManyReadByKeyOnly" />
|
||||
<PropertyValue Property="InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Insertable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Readable">
|
||||
<Bool>true</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="SelectSupport">
|
||||
<Record>
|
||||
<PropertyValue Property="Supported">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Updatable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
<PropertyValue Property="DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Deletable">
|
||||
<Bool>false</Bool>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Collection>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm"
|
||||
Version="4.01"
|
||||
>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
</edmx:Include>
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Measures.V1" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="ODataDemo">
|
||||
<Annotation Term="Core.DefaultNamespace" />
|
||||
|
||||
<EntityType Name="Product" HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Description" Type="Edm.String">
|
||||
<Annotation Term="Core.IsLanguageDependent" />
|
||||
</Property>
|
||||
<Property Name="ReleaseDate" Type="Edm.Date" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.Date" />
|
||||
<Property Name="Rating" Type="Edm.Int32" />
|
||||
<Property Name="Price" Type="Edm.Decimal">
|
||||
<Annotation Term="Org.OData.Measures.V1.ISOCurrency" Path="Currency" />
|
||||
</Property>
|
||||
<Property Name="Currency" Type="Edm.String" MaxLength="3" />
|
||||
<NavigationProperty Name="Category" Type="ODataDemo.Category" Nullable="false" Partner="Products" />
|
||||
<NavigationProperty Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="false">
|
||||
<Annotation Term="Core.IsLanguageDependent" />
|
||||
</Property>
|
||||
<NavigationProperty Name="Products" Partner="Category" Type="Collection(ODataDemo.Product)">
|
||||
<OnDelete Action="Cascade" />
|
||||
</NavigationProperty>
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Partner="Supplier" Type="Collection(ODataDemo.Product)" />
|
||||
</EntityType>
|
||||
<EntityType Name="Country">
|
||||
<Key>
|
||||
<PropertyRef Name="Code" />
|
||||
</Key>
|
||||
<Property Name="Code" Type="Edm.String" MaxLength="2" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="CountryName" Type="Edm.String" />
|
||||
<NavigationProperty Name="Country" Type="ODataDemo.Country">
|
||||
<ReferentialConstraint Property="CountryName" ReferencedProperty="Name" />
|
||||
</NavigationProperty>
|
||||
</ComplexType>
|
||||
<Function Name="ProductsByRating">
|
||||
<Parameter Name="Rating" Type="Edm.Int32" />
|
||||
<ReturnType Type="Collection(ODataDemo.Product)" />
|
||||
</Function>
|
||||
<EntityContainer Name="DemoService">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product">
|
||||
<NavigationPropertyBinding Path="Category" Target="Categories" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category">
|
||||
<Annotation Term="Core.Description" String="Product Categories" />
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</EntitySet>
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
<NavigationPropertyBinding Path="Address/Country" Target="Countries" />
|
||||
<Annotation Term="Core.OptimisticConcurrency">
|
||||
<Collection>
|
||||
<PropertyPath>Concurrency</PropertyPath>
|
||||
</Collection>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<Singleton Name="MainSupplier" Type="ODataDemo.Supplier">
|
||||
<Annotation Term="Core.Description" String="Primary Supplier" />
|
||||
<NavigationPropertyBinding Path="Products" Target="Products" />
|
||||
</Singleton>
|
||||
<EntitySet Name="Countries" EntityType="ODataDemo.Country" />
|
||||
<FunctionImport Name="ProductsByRating" EntitySet="Products" Function="ODataDemo.ProductsByRating" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,279 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<edmx:Edmx xmlns="http://docs.oasis-open.org/odata/ns/edm" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.01">
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
|
||||
</edmx:Reference>
|
||||
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
|
||||
</edmx:Reference>
|
||||
<edmx:DataServices>
|
||||
<Schema Namespace="descriptions" Alias="self">
|
||||
<Annotation Term="Core.SchemaVersion" String="0.0.1" />
|
||||
|
||||
|
||||
<EntityContainer Name="Default">
|
||||
|
||||
<EntitySet Name="entities" EntityType="self.entity">
|
||||
<Annotation Term="Core.Description" String="Entity Set - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Entity Set - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Query Entity Set - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Query Entity Set - LongDescription" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Entity by Key - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Entity by Key - LongDescription" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Create Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Create Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Delete Entity - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Delete Entity - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</EntitySet>
|
||||
<EntitySet Name="entities_ext" EntityType="self.entity" />
|
||||
|
||||
<Singleton Name="single" Type="self.entity">
|
||||
<Annotation Term="Core.Description" String="Singleton - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Singleton - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Singleton - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Singleton - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Singleton - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Singleton - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Singleton>
|
||||
<Singleton Name="single_ext" Type="self.entity" />
|
||||
|
||||
<ActionImport Action="self.action" Name="actionimport">
|
||||
<Annotation Term="Core.Description" String="Action Import - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Action Import - LongDescription" />
|
||||
</ActionImport>
|
||||
<ActionImport Action="self.action" Name="actionimport_ext" />
|
||||
<ActionImport Action="self.action" Name="actionimport_no_descriptions" />
|
||||
|
||||
<FunctionImport Function="self.function" Name="functionimport">
|
||||
<Annotation Term="Core.Description" String="Function Import - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Function Import - LongDescription" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Function="self.function" Name="functionimport_ext" />
|
||||
<FunctionImport Function="self.function" Name="functionimport_no_descriptions" />
|
||||
|
||||
</EntityContainer>
|
||||
|
||||
<Annotations Target="self.Default">
|
||||
<Annotation Term="Core.Description" String="Container - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Container - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/entities_ext">
|
||||
<Annotation Term="Core.Description" String="Entity Set Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Entity Set Ext - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Query Entity Set Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Query Entity Set Ext - LongDescription" />
|
||||
<PropertyValue Property="ReadByKeyRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Entity Set by Key Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Entity Set by Key Ext - LongDescription" />
|
||||
</Record>
|
||||
</PropertyValue>
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.InsertRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Create Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Create Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Delete Entity Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Delete Entity Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/single_ext">
|
||||
<Annotation Term="Core.Description" String="Singleton Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Singleton Ext - LongDescription" />
|
||||
<Annotation Term="Capabilities.ReadRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Read Singleton Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Read Singleton Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||
<Record>
|
||||
<PropertyValue Property="Description" String="Update Singleton Ext - Description" />
|
||||
<PropertyValue Property="LongDescription" String="Update Singleton Ext - LongDescription" />
|
||||
</Record>
|
||||
</Annotation>
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/actionimport_ext">
|
||||
<Annotation Term="Core.Description" String="Action Import Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Action Import Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.Default/functionimport_ext">
|
||||
<Annotation Term="Core.Description" String="Function Import Ext - Description" />
|
||||
<Annotation Term="Core.LongDescription" String="Function Import Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<EntityType Name="entity">
|
||||
<Annotation Term="Core.LongDescription" String="Entity Type - LongDescription" />
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="Edm.String" Nullable="false" MaxLength="70">
|
||||
<Annotation Term="Core.Description" String="Property - Description" />
|
||||
</Property>
|
||||
</EntityType>
|
||||
|
||||
<Annotations Target="self.entity">
|
||||
<Annotation Term="Core.Description" String="Entity Type - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.entity/id">
|
||||
<Annotation Term="Core.LongDescription" String="Property - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<Action Name="action">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload - Description" />
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload Parameter - Description" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Action Unbound Overload Return Type - Description" />
|
||||
</ReturnType>
|
||||
</Action>
|
||||
|
||||
<Annotations Target="self.action()">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action()/nonbinding">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Parameter Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action()/$ReturnType">
|
||||
<Annotation Term="Core.LongDescription" String="Action Unbound Overload Return Type Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Action Name="action" IsBound="true">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload - LongDescription" />
|
||||
<Parameter Name="binding" Type="self.entity">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Binding Parameter - LongDescription - is ignored" />
|
||||
</Parameter>
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Non-Binding Parameter - LongDescription" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Action Bound Overload Return Type - LongDescription" />
|
||||
</ReturnType>
|
||||
</Action>
|
||||
|
||||
<Annotations Target="self.action(self.entity)">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/binding">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Binding Parameter Ext - Description - is ignored" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/nonbinding">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Nonbinding Parameter Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.action(self.entity)/$ReturnType">
|
||||
<Annotation Term="Core.Description" String="Action Bound Overload Return Type Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
<Function Name="function">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload - Description" />
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload Parameter - Description" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.Description" String="Function Unbound Overload Return Type - Description" />
|
||||
</ReturnType>
|
||||
</Function>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)/nonbinding">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Parameter Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(Edm.String)/$ReturnType">
|
||||
<Annotation Term="Core.LongDescription" String="Function Unbound Overload Return Type Ext - LongDescription" />
|
||||
</Annotations>
|
||||
|
||||
<Function Name="function" IsBound="true">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload - LongDescription" />
|
||||
<Parameter Name="binding" Type="self.entity">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Binding Parameter - LongDescription - is ignored" />
|
||||
</Parameter>
|
||||
<Parameter Name="nonbinding" Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Nonbinding Parameter - LongDescription" />
|
||||
</Parameter>
|
||||
<ReturnType Type="Edm.String">
|
||||
<Annotation Term="Core.LongDescription" String="Function Bound Overload Return Type - LongDescription" />
|
||||
</ReturnType>
|
||||
</Function>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/binding">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Binding Parameter Ext - Description - is ignored" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/nonbinding">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Nonbinding Parameter Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
<Annotations Target="self.function(self.entity,Edm.String)/$ReturnType">
|
||||
<Annotation Term="Core.Description" String="Function Bound Overload Return Type Ext - Description" />
|
||||
</Annotations>
|
||||
|
||||
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
|
||||
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
m:DataServiceVersion="2.0"
|
||||
>
|
||||
<Schema Namespace="ODataDemo" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
xmlns="http://schemas.microsoft.com/ado/2008/09/edm"
|
||||
>
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle"
|
||||
m:FC_ContentKind="text" m:FC_KeepInContent="false" />
|
||||
<Property Name="Description" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationSummary"
|
||||
m:FC_ContentKind="text" m:FC_KeepInContent="false" />
|
||||
<Property Name="ReleaseDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.DateTime" Nullable="true" />
|
||||
<Property Name="Rating" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Decimal" Nullable="false" />
|
||||
<NavigationProperty Name="Category" Relationship="ODataDemo.Product_Category_Category_Products"
|
||||
FromRole="Product_Category" ToRole="Category_Products" />
|
||||
<NavigationProperty Name="Supplier" Relationship="ODataDemo.Product_Supplier_Supplier_Products"
|
||||
FromRole="Product_Supplier" ToRole="Supplier_Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle"
|
||||
m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Category_Category_Products"
|
||||
FromRole="Category_Products" ToRole="Product_Category" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle"
|
||||
m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" Nullable="false" ConcurrencyMode="Fixed" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Supplier_Supplier_Products"
|
||||
FromRole="Supplier_Products" ToRole="Product_Supplier" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="City" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="State" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="ZipCode" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Country" Type="Edm.String" Nullable="true" />
|
||||
</ComplexType>
|
||||
<Association Name="Product_Category_Category_Products">
|
||||
<End Role="Product_Category" Type="ODataDemo.Product" Multiplicity="*" />
|
||||
<End Role="Category_Products" Type="ODataDemo.Category" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<Association Name="Product_Supplier_Supplier_Products">
|
||||
<End Role="Product_Supplier" Type="ODataDemo.Product" Multiplicity="*" />
|
||||
<End Role="Supplier_Products" Type="ODataDemo.Supplier" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<EntityContainer Name="DemoService" m:IsDefaultEntityContainer="true">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product" />
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category" />
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier" />
|
||||
<AssociationSet Name="Products_Category_Categories" Association="ODataDemo.Product_Category_Category_Products">
|
||||
<End Role="Product_Category" EntitySet="Products" />
|
||||
<End Role="Category_Products" EntitySet="Categories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_Supplier_Suppliers" Association="ODataDemo.Product_Supplier_Supplier_Products">
|
||||
<End Role="Product_Supplier" EntitySet="Products" />
|
||||
<End Role="Supplier_Products" EntitySet="Suppliers" />
|
||||
</AssociationSet>
|
||||
<FunctionImport Name="GetProductsByRating" EntitySet="Products" ReturnType="Collection(ODataDemo.Product)"
|
||||
m:HttpMethod="GET"
|
||||
>
|
||||
<Parameter Name="rating" Type="Edm.Int32" Mode="In" />
|
||||
</FunctionImport>
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
|
||||
<edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0"
|
||||
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
|
||||
>
|
||||
<Schema Namespace="ODataDemo" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
||||
<EntityType Name="Product">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="false" />
|
||||
<Property Name="Description" Type="Edm.String" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="false" />
|
||||
<Property Name="ReleaseDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="DiscontinuedDate" Type="Edm.DateTime" />
|
||||
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
|
||||
<Property Name="Price" Type="Edm.Double" Nullable="false" />
|
||||
<NavigationProperty Name="Categories" Relationship="ODataDemo.Product_Categories_Category_Products"
|
||||
ToRole="Category_Products" FromRole="Product_Categories" />
|
||||
<NavigationProperty Name="Supplier" Relationship="ODataDemo.Product_Supplier_Supplier_Products" ToRole="Supplier_Products"
|
||||
FromRole="Product_Supplier" />
|
||||
<NavigationProperty Name="ProductDetail" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
|
||||
ToRole="ProductDetail_Product" FromRole="Product_ProductDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="FeaturedProduct" BaseType="ODataDemo.Product">
|
||||
<NavigationProperty Name="Advertisement" Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
|
||||
ToRole="Advertisement_FeaturedProduct" FromRole="FeaturedProduct_Advertisement" />
|
||||
</EntityType>
|
||||
<EntityType Name="ProductDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="ProductID" />
|
||||
</Key>
|
||||
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Details" Type="Edm.String" />
|
||||
<NavigationProperty Name="Product" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
|
||||
ToRole="Product_ProductDetail" FromRole="ProductDetail_Product" />
|
||||
</EntityType>
|
||||
<EntityType Name="Category" OpenType="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="true" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Categories_Category_Products"
|
||||
ToRole="Product_Categories" FromRole="Category_Products" />
|
||||
</EntityType>
|
||||
<EntityType Name="Supplier">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text"
|
||||
m:FC_KeepInContent="true" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" />
|
||||
<Property Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false" />
|
||||
<NavigationProperty Name="Products" Relationship="ODataDemo.Product_Supplier_Supplier_Products" ToRole="Product_Supplier"
|
||||
FromRole="Supplier_Products" />
|
||||
</EntityType>
|
||||
<ComplexType Name="Address">
|
||||
<Property Name="Street" Type="Edm.String" />
|
||||
<Property Name="City" Type="Edm.String" />
|
||||
<Property Name="State" Type="Edm.String" />
|
||||
<Property Name="ZipCode" Type="Edm.String" />
|
||||
<Property Name="Country" Type="Edm.String" />
|
||||
</ComplexType>
|
||||
<EntityType Name="Person">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<NavigationProperty Name="PersonDetail" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
|
||||
ToRole="PersonDetail_Person" FromRole="Person_PersonDetail" />
|
||||
</EntityType>
|
||||
<EntityType Name="Customer" BaseType="ODataDemo.Person">
|
||||
<Property Name="TotalExpense" Type="Edm.Decimal" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="Employee" BaseType="ODataDemo.Person">
|
||||
<Property Name="EmployeeID" Type="Edm.Int64" Nullable="false" />
|
||||
<Property Name="HireDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="Salary" Type="Edm.Single" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="PersonDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="PersonID" />
|
||||
</Key>
|
||||
<Property Name="PersonID" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Age" Type="Edm.Byte" Nullable="false" />
|
||||
<Property Name="Gender" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="Phone" Type="Edm.String" />
|
||||
<Property Name="Address" Type="ODataDemo.Address" />
|
||||
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
|
||||
<NavigationProperty Name="Person" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
|
||||
ToRole="Person_PersonDetail" FromRole="PersonDetail_Person" />
|
||||
</EntityType>
|
||||
<EntityType Name="Advertisement" m:HasStream="true">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
</Key>
|
||||
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
||||
<Property Name="Name" Type="Edm.String" />
|
||||
<Property Name="AirDate" Type="Edm.DateTime" Nullable="false" />
|
||||
<NavigationProperty Name="FeaturedProduct" Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
|
||||
ToRole="FeaturedProduct_Advertisement" FromRole="Advertisement_FeaturedProduct" />
|
||||
</EntityType>
|
||||
<Association Name="Product_Categories_Category_Products">
|
||||
<End Type="ODataDemo.Category" Role="Category_Products" Multiplicity="*" />
|
||||
<End Type="ODataDemo.Product" Role="Product_Categories" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="Product_Supplier_Supplier_Products">
|
||||
<End Type="ODataDemo.Supplier" Role="Supplier_Products" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Product" Role="Product_Supplier" Multiplicity="*" />
|
||||
</Association>
|
||||
<Association Name="Product_ProductDetail_ProductDetail_Product">
|
||||
<End Type="ODataDemo.ProductDetail" Role="ProductDetail_Product" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Product" Role="Product_ProductDetail" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<Association Name="FeaturedProduct_Advertisement_Advertisement_FeaturedProduct">
|
||||
<End Type="ODataDemo.Advertisement" Role="Advertisement_FeaturedProduct" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.FeaturedProduct" Role="FeaturedProduct_Advertisement" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<Association Name="Person_PersonDetail_PersonDetail_Person">
|
||||
<End Type="ODataDemo.PersonDetail" Role="PersonDetail_Person" Multiplicity="0..1" />
|
||||
<End Type="ODataDemo.Person" Role="Person_PersonDetail" Multiplicity="0..1" />
|
||||
</Association>
|
||||
<EntityContainer Name="DemoService" m:IsDefaultEntityContainer="true">
|
||||
<EntitySet Name="Products" EntityType="ODataDemo.Product" />
|
||||
<EntitySet Name="ProductDetails" EntityType="ODataDemo.ProductDetail" />
|
||||
<EntitySet Name="Categories" EntityType="ODataDemo.Category" />
|
||||
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier" />
|
||||
<EntitySet Name="Persons" EntityType="ODataDemo.Person" />
|
||||
<EntitySet Name="PersonDetails" EntityType="ODataDemo.PersonDetail" />
|
||||
<EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement" />
|
||||
<FunctionImport Name="GetProductsByRating" ReturnType="Collection(ODataDemo.Product)" EntitySet="Products"
|
||||
m:HttpMethod="GET"
|
||||
>
|
||||
<Parameter Name="rating" Type="Edm.Int16" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="Discount" ReturnType="Edm.Double" IsBindable="true" m:IsAlwaysBindable="true">
|
||||
<Parameter Name="product" Type="ODataDemo.Product" />
|
||||
<Parameter Name="discountPercentage" Type="Edm.Int32" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="IncreaseSalaries">
|
||||
<Parameter Name="percentage" Type="Edm.Int32" Nullable="false" />
|
||||
</FunctionImport>
|
||||
<AssociationSet Name="Products_Advertisement_Advertisements" Association="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct">
|
||||
<End Role="FeaturedProduct_Advertisement" EntitySet="Products" />
|
||||
<End Role="Advertisement_FeaturedProduct" EntitySet="Advertisements" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_Categories_Categories" Association="ODataDemo.Product_Categories_Category_Products">
|
||||
<End Role="Product_Categories" EntitySet="Products" />
|
||||
<End Role="Category_Products" EntitySet="Categories" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_Supplier_Suppliers" Association="ODataDemo.Product_Supplier_Supplier_Products">
|
||||
<End Role="Product_Supplier" EntitySet="Products" />
|
||||
<End Role="Supplier_Products" EntitySet="Suppliers" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Products_ProductDetail_ProductDetails" Association="ODataDemo.Product_ProductDetail_ProductDetail_Product">
|
||||
<End Role="Product_ProductDetail" EntitySet="Products" />
|
||||
<End Role="ProductDetail_Product" EntitySet="ProductDetails" />
|
||||
</AssociationSet>
|
||||
<AssociationSet Name="Persons_PersonDetail_PersonDetails" Association="ODataDemo.Person_PersonDetail_PersonDetail_Person">
|
||||
<End Role="Person_PersonDetail" EntitySet="Persons" />
|
||||
<End Role="PersonDetail_Person" EntitySet="PersonDetails" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<Annotations Target="ODataDemo.DemoService">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.Product/Name">
|
||||
<ValueAnnotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
||||
</Annotations>
|
||||
<Annotations Target="ODataDemo.DemoService/Suppliers">
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PublisherId" String="MSFT" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.Keywords" String="Inventory, Supplier, Advertisers, Sales, Finance" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.AttributionDescription" String="All rights reserved" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.DocumentationUrl " String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.TermsOfUseUrl" String="All rights reserved" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl" String="http://www.odata.org/" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.LastModified" String="4/2/2013" />
|
||||
<ValueAnnotation Term="Org.OData.Publication.V1.ImageUrl " String="http://www.odata.org/" />
|
||||
</Annotations>
|
||||
</Schema>
|
||||
</edmx:DataServices>
|
||||
</edmx:Edmx>
|
|
@ -0,0 +1,82 @@
|
|||
@echo off
|
||||
setlocal
|
||||
set here=%~dp0
|
||||
|
||||
@rem This script uses the Apache Xalan 2.7.2 XSLT processor
|
||||
@rem For a description of Xalan command-line parameters see http://xalan.apache.org/xalan-j/commandline.html
|
||||
@rem
|
||||
@rem Prerequisites
|
||||
@rem - Java SE is installed and in the PATH - download from http://www.oracle.com/technetwork/java/javase/downloads/index.html
|
||||
@rem - git is installed and in the PATH - download from https://git-for-windows.github.io/
|
||||
@rem Xalan is installed and CLASSPATH contains xalan.jar and serializer.jar - download from http://xalan.apache.org/xalan-j/downloads.html
|
||||
set CLASSPATH=%here%xalan/xalan.jar;%here%xalan/serializer.jar
|
||||
@rem - YAJL's json_reformat from https://github.com/lloyd/yajl has been compiled and is in the PATH
|
||||
@rem - Node.js is installed - download from https://nodejs.org/
|
||||
@rem - ajv-cli is installed - npm install -g ajv-cli
|
||||
@rem - https://github.com/OAI/OpenAPI-Specification is cloned next to this project
|
||||
set SCHEMA_THREE=%here..\..\OpenAPI-Specification\schemas\v3.0\schema.json
|
||||
set SCHEMA_TWO=%here..\..\OpenAPI-Specification\schemas\v2.0\schema.json
|
||||
|
||||
if exist "%1" (
|
||||
call :process %1 https localhost /service-root %2
|
||||
) else (
|
||||
echo Usage: transform source [/swagger]
|
||||
echo.
|
||||
echo source Specifies the file to be transformed.
|
||||
echo /swagger Output Swagger 2.0 in addition to OpenAPI 3.0.0
|
||||
)
|
||||
|
||||
endlocal
|
||||
exit /b
|
||||
|
||||
|
||||
:process
|
||||
echo %~n1
|
||||
|
||||
for /f %%V in ('java.exe org.apache.xalan.xslt.Process -XSL %here%OData-Version.xsl -IN %1') do set ODATA_VERSION=%%V
|
||||
|
||||
if [%ODATA_VERSION%]==[2.0] (
|
||||
java.exe org.apache.xalan.xslt.Process -L -XSL %here%V2-to-V4-CSDL.xsl -IN %1 -OUT %~dpn1.V4.xml
|
||||
set INPUT=%~dpn1.V4.xml
|
||||
) else if [%ODATA_VERSION%]==[3.0] (
|
||||
java.exe org.apache.xalan.xslt.Process -L -XSL %here%V2-to-V4-CSDL.xsl -IN %1 -OUT %~dpn1.V4.xml
|
||||
set INPUT=%~dpn1.V4.xml
|
||||
) else (
|
||||
set INPUT=%1
|
||||
)
|
||||
|
||||
if [%5]==[/swagger] (
|
||||
java.exe org.apache.xalan.xslt.Process -L -XSL %here%V4-CSDL-to-OpenAPI.xsl -PARAM scheme %2 -PARAM host %3 -PARAM basePath %4 -PARAM odata-version %ODATA_VERSION% -PARAM diagram YES -PARAM openapi-root "https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/" -PARAM openapi-version 2.0 -IN %INPUT% -OUT %~dpn1.tmp2.json
|
||||
|
||||
json_reformat.exe < %~dpn1.tmp2.json > %~dpn1.swagger.json
|
||||
if not errorlevel 1 (
|
||||
del %~dpn1.tmp2.json
|
||||
|
||||
pushd .
|
||||
%~d1
|
||||
cd %~p1
|
||||
git.exe --no-pager diff %~n1.swagger.json 2>nul
|
||||
popd
|
||||
|
||||
if exist %SCHEMA_TWO% call ajv validate -s %SCHEMA_TWO% -d %~dpn1.swagger.json > nul
|
||||
)
|
||||
)
|
||||
|
||||
java.exe org.apache.xalan.xslt.Process -L -XSL %here%V4-CSDL-to-OpenAPI.xsl -PARAM scheme %2 -PARAM host %3 -PARAM basePath %4 -PARAM odata-version %ODATA_VERSION% -PARAM diagram YES -PARAM openapi-root "https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/" -PARAM openapi-version 3.0.0 -IN %INPUT% -OUT %~dpn1.tmp3.json
|
||||
|
||||
json_reformat.exe < %~dpn1.tmp3.json > %~dpn1.openapi3.json
|
||||
if not errorlevel 1 (
|
||||
del %~dpn1.tmp3.json
|
||||
if [%ODATA_VERSION%]==[2.0] del %~dpn1.V4.xml
|
||||
if [%ODATA_VERSION%]==[3.0] del %~dpn1.V4.xml
|
||||
|
||||
pushd .
|
||||
%~d1
|
||||
cd %~p1
|
||||
git.exe --no-pager diff %~n1.openapi3.json 2>nul
|
||||
popd
|
||||
|
||||
if exist %SCHEMA_THREE% call ajv validate -s %SCHEMA_THREE% -d %~dpn1.openapi3.json > nul
|
||||
)
|
||||
|
||||
exit /b
|
|
@ -0,0 +1,225 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/* TODO:
|
||||
- glob for source file patterns
|
||||
- arguments for
|
||||
- info-title/description/version?
|
||||
- externalDocs-url/description?
|
||||
*/
|
||||
//console.dir(argv);
|
||||
|
||||
'use strict';
|
||||
|
||||
var xslt4node = require('xslt4node');
|
||||
var minimist = require('minimist');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
var xsltpath = path.dirname(require.main.filename) + path.sep;
|
||||
xslt4node.addLibrary(xsltpath + 'xalan/xalan.jar');
|
||||
|
||||
var unknown = false;
|
||||
|
||||
var argv = minimist(process.argv.slice(2), {
|
||||
string: ["o", "openapi-version", "t", "target", "scheme", "host", "basePath"],
|
||||
boolean: ["d", "diagram", "h", "help", "p", "pretty", "r", "references", "u", "used-schemas-only", "verbose"],
|
||||
alias: {
|
||||
d: "diagram",
|
||||
h: "help",
|
||||
o: "openapi-version",
|
||||
p: "pretty",
|
||||
r: "references",
|
||||
t: "target",
|
||||
u: "used-schemas-only",
|
||||
v: "odata-version"
|
||||
},
|
||||
default: {
|
||||
basePath: "/service-root",
|
||||
diagram: false,
|
||||
host: "localhost",
|
||||
"odata-version": "4.0",
|
||||
"openapi-version": "3.0.0",
|
||||
pretty: false,
|
||||
references: false,
|
||||
scheme: "http",
|
||||
verbose: false
|
||||
},
|
||||
unknown: (arg) => {
|
||||
if (arg.substring(0, 1) == '-') {
|
||||
console.error('Unknown option: ' + arg);
|
||||
unknown = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (argv.o == '2') argv.o = "2.0";
|
||||
if (argv.o == '3') argv.o = "3.0.0";
|
||||
|
||||
if (unknown || argv._.length == 0 || argv.h) {
|
||||
console.log(`Usage: odata-openapi <options> <source files>
|
||||
Options:
|
||||
--basePath base path (default: /service-root)
|
||||
-d, --diagram include YUML diagram
|
||||
-h, --help show this info
|
||||
--host host (default: localhost)
|
||||
-o, --openapi-version 3.0.0 or 2.0 (default: 3.0.0)
|
||||
-p, --pretty pretty-print JSON result
|
||||
-r, --references include references to other files
|
||||
--scheme scheme (default: http)
|
||||
-t, --target target file (only useful with a single source file)
|
||||
-u, --used-schemas-only produce only schemas that are actually used in operation objects
|
||||
--verbose output additional progress information`);
|
||||
} else {
|
||||
for (var i = 0; i < argv._.length; i++) {
|
||||
transform(argv._[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function transform(source) {
|
||||
if (!fs.existsSync(source)) {
|
||||
console.error('Source file not found: ' + source);
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.verbose) console.log('Checking OData version used in source file: ' + source);
|
||||
|
||||
xslt4node.transform(
|
||||
{
|
||||
xsltPath: xsltpath + 'OData-Version.xsl',
|
||||
sourcePath: source,
|
||||
result: String
|
||||
},
|
||||
(err, result) => {
|
||||
if (err) {
|
||||
console.error('Source file not XML: ' + source);
|
||||
} else if (result == "") {
|
||||
console.error('Source file not OData: ' + source);
|
||||
} else if (result == "2.0" || result == "3.0") {
|
||||
transformV2V3(source, result);
|
||||
} else {
|
||||
transformV4(source, "4.0", false);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function transformV2V3(source, version) {
|
||||
var target = source.substring(0, source.lastIndexOf('.') + 1) + 'tmp';
|
||||
|
||||
if (argv.verbose) console.log('Transforming ' + source + ' to OData V4, target file: ' + target);
|
||||
|
||||
xslt4node.transform(
|
||||
{
|
||||
xsltPath: xsltpath + 'V2-to-V4-CSDL.xsl',
|
||||
sourcePath: source,
|
||||
result: target
|
||||
},
|
||||
(err, result) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
transformV4(target, version, true);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function transformV4(source, version, deleteSource) {
|
||||
var target = argv.t || source.substring(0, source.lastIndexOf('.') + 1) + 'openapi.json';
|
||||
|
||||
if (argv.verbose) console.log('Transforming ' + source + ' to OpenAPI ' + argv.o + ', target file: ' + target);
|
||||
|
||||
xslt4node.transform(
|
||||
{
|
||||
xsltPath: xsltpath + 'V4-CSDL-to-OpenAPI.xsl',
|
||||
sourcePath: source,
|
||||
result: (argv.pretty || argv.u ? Buffer : target),
|
||||
params: {
|
||||
basePath: argv.basePath,
|
||||
diagram: argv.diagram,
|
||||
host: argv.host,
|
||||
"odata-version": version,
|
||||
"openapi-version": argv.o,
|
||||
references: argv.references,
|
||||
scheme: argv.scheme
|
||||
}
|
||||
},
|
||||
(err, result) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
if (argv.pretty || argv.u) {
|
||||
try {
|
||||
let openapi = JSON.parse(result);
|
||||
if (argv.u)
|
||||
deleteUnusedSchemas(openapi);
|
||||
fs.writeFileSync(target, JSON.stringify(openapi, null, (argv.pretty ? 4 : 0)));
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
fs.writeFileSync(target, result);
|
||||
}
|
||||
}
|
||||
if (deleteSource) {
|
||||
if (argv.verbose) console.log('Removing intermediate file: ' + source);
|
||||
fs.unlink(source, (err) => { if (err) console.error(err); });
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function deleteUnusedSchemas(openapi) {
|
||||
var referenced;
|
||||
var deleted;
|
||||
|
||||
while (true) {
|
||||
referenced = {};
|
||||
getReferencedSchemas(openapi, referenced);
|
||||
|
||||
if (openapi.hasOwnProperty('components'))
|
||||
deleted = deleteUnreferenced(openapi.components.schemas, referenced, '#/components/schemas/');
|
||||
else
|
||||
deleted = deleteUnreferenced(openapi.definitions, referenced, '#/definitions/');
|
||||
|
||||
if (!deleted) break;
|
||||
}
|
||||
|
||||
if (openapi.hasOwnProperty('components')) {
|
||||
deleteUnreferenced(openapi.components.parameters, referenced, '#/components/parameters/');
|
||||
if (Object.keys(openapi.components.parameters).length == 0)
|
||||
delete openapi.components.parameters;
|
||||
} else {
|
||||
deleteUnreferenced(openapi.parameters, referenced, '#/parameters/');
|
||||
if (Object.keys(openapi.parameters).length == 0)
|
||||
delete openapi.parameters;
|
||||
}
|
||||
}
|
||||
|
||||
function getReferencedSchemas(document, referenced) {
|
||||
Object.keys(document).forEach(key => {
|
||||
let value = document[key];
|
||||
if (key == '$ref') {
|
||||
if (value.startsWith('#'))
|
||||
referenced[value] = true;
|
||||
} else {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(item => getReferencedSchemas(item, referenced))
|
||||
} else if (typeof value == 'object' && value != null) {
|
||||
getReferencedSchemas(value, referenced);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteUnreferenced(schemas, referenced, prefix) {
|
||||
var deleted = false;
|
||||
|
||||
Object.keys(schemas).forEach(key => {
|
||||
if (!referenced[prefix + key]) {
|
||||
delete schemas[key];
|
||||
deleted = true;
|
||||
}
|
||||
});
|
||||
|
||||
return deleted;
|
||||
}
|
|
@ -0,0 +1,684 @@
|
|||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
The license above applies to this Apache Xalan release of:
|
||||
Xalan-Java 2 - XSLT Processor
|
||||
Xalan-Java 2 - Serializer
|
||||
|
||||
The license above also applies to the jar files
|
||||
xalan.jar and xsltc.jar - Xalan-Java 2 - XSLT Processor from
|
||||
Source: http://xalan.apache.org/
|
||||
|
||||
The license above also applies to the jar file
|
||||
serializer.jar - Xalan-Java 2 - Serializer
|
||||
Source: http://xalan.apache.org/
|
||||
Used by: Xalan-Java 2 and Xerces-Java 2
|
||||
|
||||
The license above also applies to the jar file
|
||||
xercesImpl.jar - Xerces-Java 2 XML Parser.
|
||||
Source: http://xerces.apache.org/
|
||||
Used by: Xalan-Java 2
|
||||
|
||||
The license above also applies to the jar file
|
||||
xml-apis.jar - Xerces-Java 2 XML Parser.
|
||||
Source: http://xerces.apache.org/
|
||||
Used by: Xalan-Java 2 and release copy of Xerces-Java 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the included files:
|
||||
tools/ant.jar
|
||||
tools/antRun
|
||||
tools/antRun.bat
|
||||
Source: http://ant.apache.org/
|
||||
Used By: Xalan's build process: java/build.xml and test/build.xml
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
/*
|
||||
* ============================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
* ============================================================================
|
||||
*
|
||||
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if any, must
|
||||
* include the following acknowledgment: "This product includes software
|
||||
* developed by the Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself, if
|
||||
* and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Ant" and "Apache Software Foundation" must not be used to
|
||||
* endorse or promote products derived from this software without prior
|
||||
* written permission. For written permission, please contact
|
||||
* apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache", nor may
|
||||
* "Apache" appear in their name, without prior written permission of the
|
||||
* Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
|
||||
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* on behalf of the Apache Software Foundation. For more information on the
|
||||
* Apache Software Foundation, please see <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license, Apache Software License, Version 1.1,
|
||||
applies to the included BCEL.jar from Apache Jakarta
|
||||
(Byte Code Engineering Library).
|
||||
Source: http://jakarta.apache.org/bcel
|
||||
Used By: XSLTC component of xml-xalan/java
|
||||
|
||||
The following license, Apache Software License, Version 1.1,
|
||||
also applies to the included regexp.jar,
|
||||
jakarta-regexp-1.2.jar from Apache Jakarta.
|
||||
Source: http://jakarta.apache.org/regexp
|
||||
Used By: BCEL.jar which is used by XSLTC component of xml-xalan/java
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache BCEL" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache BCEL", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the DOM documentation
|
||||
for the org.w3c.dom.* packages:
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
W3C® DOCUMENT LICENSE
|
||||
http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
|
||||
Public documents on the W3C site are provided by the copyright holders
|
||||
under the following license. By using and/or copying this document,
|
||||
or the W3C document from which this statement is linked, you (the licensee)
|
||||
agree that you have read, understood, and will comply with the following
|
||||
terms and conditions:
|
||||
|
||||
Permission to copy, and distribute the contents of this document, or the
|
||||
W3C document from which this statement is linked, in any medium for any
|
||||
purpose and without fee or royalty is hereby granted, provided that you include
|
||||
the following on ALL copies of the document, or portions thereof, that you use:
|
||||
|
||||
1. A link or URL to the original W3C document.
|
||||
2. The pre-existing copyright notice of the original author, or if it
|
||||
doesn't exist, a notice (hypertext is preferred, but a textual representation
|
||||
is permitted) of the form: "Copyright © [$date-of-document] World Wide Web
|
||||
Consortium, (Massachusetts Institute of Technology, European Research
|
||||
Consortium for Informatics and Mathematics, Keio University). All Rights
|
||||
Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
|
||||
3. If it exists, the STATUS of the W3C document.
|
||||
|
||||
When space permits, inclusion of the full text of this NOTICE should be provided.
|
||||
We request that authorship attribution be provided in any software, documents,
|
||||
or other items or products that you create pursuant to the implementation of the
|
||||
contents of this document, or any portion thereof.
|
||||
|
||||
No right to create modifications or derivatives of W3C documents is granted pursuant
|
||||
to this license. However, if additional requirements (documented in the Copyright FAQ)
|
||||
are satisfied, the right to create modifications or derivatives is sometimes granted
|
||||
by the W3C to individuals complying with those requirements.
|
||||
|
||||
THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS
|
||||
OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE;
|
||||
THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
|
||||
IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
|
||||
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
|
||||
OR IMPLEMENTATION OF THE CONTENTS THEREOF.
|
||||
|
||||
The name and trademarks of copyright holders may NOT be used in advertising
|
||||
or publicity pertaining to this document or its contents without specific,
|
||||
written prior permission. Title to copyright in this document will at all
|
||||
times remain with copyright holders.
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
This formulation of W3C's notice and license became active on December 31 2002.
|
||||
This version removes the copyright ownership notice such that this license
|
||||
can be used with materials other than those owned by the W3C, moves information
|
||||
on style sheets, DTDs, and schemas to the Copyright FAQ, reflects that ERCIM
|
||||
is now a host of the W3C, includes references to this specific dated version
|
||||
of the license, and removes the ambiguous grant of "use". See the older
|
||||
formulation for the policy prior to this date. Please see our Copyright FAQ for
|
||||
common questions about using materials from our site, such as the translating
|
||||
or annotating specifications. Other questions about this notice can be directed
|
||||
to site-policy@w3.org.
|
||||
|
||||
|
||||
Joseph Reagle <mailto:site-policy@w3.org
|
||||
Last revised by Reagle $Date: 2005-07-19 12:33:09 -0400 (Tue, 19 Jul 2005) $
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the DOM software,
|
||||
for the org.w3c.dom.* packages in jar file xml-apis.jar:
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
W3C® SOFTWARE NOTICE AND LICENSE
|
||||
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
||||
This work (and included software, documentation such as READMEs,
|
||||
or other related items) is being provided by the copyright holders
|
||||
under the following license. By obtaining, using and/or copying this
|
||||
work, you (the licensee) agree that you have read, understood, and will
|
||||
comply with the following terms and conditions.
|
||||
|
||||
Permission to copy, modify, and distribute this software and its
|
||||
documentation, with or without modification, for any purpose and
|
||||
without fee or royalty is hereby granted, provided that you include
|
||||
the following on ALL copies of the software and documentation or
|
||||
portions thereof, including modifications:
|
||||
|
||||
1. The full text of this NOTICE in a location viewable to users of the
|
||||
redistributed or derivative work.
|
||||
2. Any pre-existing intellectual property disclaimers, notices,
|
||||
or terms and conditions. If none exist, the W3C Software Short Notice
|
||||
should be included (hypertext is preferred, text is permitted) within
|
||||
the body of any redistributed or derivative code.
|
||||
3. Notice of any changes or modifications to the files, including the
|
||||
date changes were made. (We recommend you provide URIs to the location
|
||||
from which the code is derived.)
|
||||
|
||||
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
|
||||
MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
|
||||
PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
|
||||
ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
||||
|
||||
The name and trademarks of copyright holders may NOT be used in advertising
|
||||
or publicity pertaining to the software without specific, written prior
|
||||
permission. Title to copyright in this software and any associated documentation
|
||||
will at all times remain with copyright holders.
|
||||
|
||||
|
||||
____________________________________
|
||||
|
||||
This formulation of W3C's notice and license became active on December 31 2002.
|
||||
This version removes the copyright ownership notice such that this license can
|
||||
be used with materials other than those owned by the W3C, reflects that ERCIM
|
||||
is now a host of the W3C, includes references to this specific dated version
|
||||
of the license, and removes the ambiguous grant of "use". Otherwise, this
|
||||
version is the same as the previous version and is written so as to preserve
|
||||
the Free Software Foundation's assessment of GPL compatibility and OSI's
|
||||
certification under the Open Source Definition. Please see our Copyright FAQ
|
||||
for common questions about using materials from our site, including specific
|
||||
terms and conditions for packages like libwww, Amaya, and Jigsaw. Other
|
||||
questions about this notice can be directed to site-policy@w3.org.
|
||||
|
||||
|
||||
Joseph Reagle <mailto:site-policy@w3.org
|
||||
Last revised by Reagle $Date: 2005-07-19 12:33:09 -0400 (Tue, 19 Jul 2005) $
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the SAX software,
|
||||
for the org.xml.sax.* packages in jar file xml-apis.jar:
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
This module, both source code and documentation, is in the Public Domain,
|
||||
and comes with NO WARRANTY. See http://www.saxproject.org for further information.
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the jar file
|
||||
java_cup.jar - LALR Parser Generator for Java(TM).
|
||||
Source: http://www.cs.princeton.edu/~appel/modern/java/CUP
|
||||
Used By: XSLTC component of xml-xalan/java
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
CUP Parser Generator Copyright Notice, License, and Disclaimer
|
||||
|
||||
Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted, provided
|
||||
that the above copyright notice appear in all copies and that both
|
||||
the copyright notice and this permission notice and warranty disclaimer
|
||||
appear in supporting documentation, and that the names of the authors
|
||||
or their employers not be used in advertising or publicity pertaining
|
||||
to distribution of the software without specific, written prior permission.
|
||||
|
||||
The authors and their employers disclaim all warranties with regard to
|
||||
this software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the authors or their employers be liable
|
||||
for any special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether in an action
|
||||
of contract, negligence or other tortious action, arising out of or
|
||||
in connection with the use or performance of this software.
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the jar file runtime.jar - Component
|
||||
of JavaCup: LALR Parser Generator for Java(TM).
|
||||
Source: http://www.cs.princeton.edu/~appel/modern/java/CUP
|
||||
Used By: XSLTC component of xml-xalan/java
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
CUP Parser Generator Copyright Notice, License, and Disclaimer
|
||||
(runtime.jar component)
|
||||
|
||||
Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted, provided
|
||||
that the above copyright notice appear in all copies and that both
|
||||
the copyright notice and this permission notice and warranty disclaimer
|
||||
appear in supporting documentation, and that the names of the authors
|
||||
or their employers not be used in advertising or publicity pertaining
|
||||
to distribution of the software without specific, written prior permission.
|
||||
|
||||
The authors and their employers disclaim all warranties with regard to
|
||||
this software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the authors or their employers be liable
|
||||
for any special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether in an action
|
||||
of contract, negligence or other tortious action, arising out of or
|
||||
in connection with the use or performance of this software.
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the JLEX jar file
|
||||
JLex.jar - A Lexical Analyzer Generator for Java(TM).
|
||||
Source: http://www.cs.princeton.edu/~appel/modern/java/JLex
|
||||
Used By: XSLTC component of xml-xalan/java
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
JLEX COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
|
||||
|
||||
Copyright 1996-2000 by Elliot Joel Berk and C. Scott Ananian
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and
|
||||
that both the copyright notice and this permission notice and
|
||||
warranty disclaimer appear in supporting documentation, and that the
|
||||
name of the authors or their employers not be used in advertising or
|
||||
publicity pertaining to distribution of the software without specific,
|
||||
written prior permission.
|
||||
|
||||
The authors and their employers disclaim all warranties with regard
|
||||
to this software, including all implied warranties of merchantability and
|
||||
fitness. In no event shall the authors or their employers be liable for any
|
||||
special, indirect or consequential damages or any damages whatsoever resulting
|
||||
from loss of use, data or profits, whether in an action of contract,
|
||||
negligence or other tortious action, arising out of or in connection
|
||||
with the use or performance of this software.
|
||||
|
||||
Java is a trademark of Sun Microsystems, Inc. References to the Java
|
||||
programming language in relation to JLex are not meant to imply that
|
||||
Sun endorses this product.
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The following license applies to the jar file
|
||||
stylebook-1.0-b3_xalan-2.jar - Tool for generating Xalan documentation.
|
||||
Integrated with Xalan-Java 2 and Xerces 2.
|
||||
Source: http://svn.apache.org/viewvc/xml/stylebook/
|
||||
Used by: Xalan-Java 2, Xalan-C++
|
||||
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
/*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1999 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Xalan", "Xerces", and "Apache Software Foundation" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* nor may "Apache" appear in their name, without prior written
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation and was
|
||||
* originally based on software copyright (c) 1999, International
|
||||
* Business Machines, Inc., http://www.apache.org. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
@ -0,0 +1,80 @@
|
|||
=========================================================================
|
||||
== NOTICE file corresponding to section 4(d) of the Apache License, ==
|
||||
== Version 2.0, in this case for the Apache Xalan Java distribution. ==
|
||||
=========================================================================
|
||||
|
||||
Apache Xalan (Xalan XSLT processor)
|
||||
Copyright 1999-2014 The Apache Software Foundation
|
||||
|
||||
Apache Xalan (Xalan serializer)
|
||||
Copyright 1999-2012 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
=========================================================================
|
||||
Portions of this software was originally based on the following:
|
||||
- software copyright (c) 1999-2002, Lotus Development Corporation.,
|
||||
http://www.lotus.com.
|
||||
- software copyright (c) 2001-2002, Sun Microsystems.,
|
||||
http://www.sun.com.
|
||||
- software copyright (c) 2003, IBM Corporation.,
|
||||
http://www.ibm.com.
|
||||
|
||||
=========================================================================
|
||||
The binary distribution package (ie. jars, samples and documentation) of
|
||||
this product includes software developed by the following:
|
||||
|
||||
- The Apache Software Foundation
|
||||
- Xerces Java - see LICENSE.txt
|
||||
- JAXP 1.3 APIs - see LICENSE.txt
|
||||
- Bytecode Engineering Library - see LICENSE.txt
|
||||
- Regular Expression - see LICENSE.txt
|
||||
|
||||
- Scott Hudson, Frank Flannery, C. Scott Ananian
|
||||
- CUP Parser Generator runtime (javacup\runtime) - see LICENSE.txt
|
||||
|
||||
=========================================================================
|
||||
The source distribution package (ie. all source and tools required to build
|
||||
Xalan Java) of this product includes software developed by the following:
|
||||
|
||||
- The Apache Software Foundation
|
||||
- Xerces Java - see LICENSE.txt
|
||||
- JAXP 1.3 APIs - see LICENSE.txt
|
||||
- Bytecode Engineering Library - see LICENSE.txt
|
||||
- Regular Expression - see LICENSE.txt
|
||||
- Ant - see LICENSE.txt
|
||||
- Stylebook doc tool - see LICENSE.txt
|
||||
|
||||
- Elliot Joel Berk and C. Scott Ananian
|
||||
- Lexical Analyzer Generator (JLex) - see LICENSE.txt
|
||||
|
||||
=========================================================================
|
||||
Apache Xerces Java
|
||||
Copyright 1999-2006 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
Portions of Apache Xerces Java in xercesImpl.jar and xml-apis.jar
|
||||
were originally based on the following:
|
||||
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
|
||||
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
|
||||
- voluntary contributions made by Paul Eng on behalf of the
|
||||
Apache Software Foundation that were originally developed at iClick, Inc.,
|
||||
software copyright (c) 1999.
|
||||
|
||||
=========================================================================
|
||||
Apache xml-commons xml-apis (redistribution of xml-apis.jar)
|
||||
|
||||
Apache XML Commons
|
||||
Copyright 2001-2003,2006 The Apache Software Foundation.
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
Portions of this software were originally based on the following:
|
||||
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
|
||||
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
|
||||
- software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
|
||||
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue