forked from OData/RESTier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vincent He
committed
Apr 13, 2016
1 parent
dbe9a3c
commit b6c0d5b
Showing
4 changed files
with
142 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# How to contribute? | ||
There are many ways for you to contribute to RESTier. The easiest way is to participate in discussion of features and issues. You can also contribute by sending pull requests of features or bug fixes to us. Contribution to the [documentations](http://odata.github.io/RESTier/) is also highly welcomed. | ||
|
||
## 1. Discussion | ||
You can participate into discussions and ask questions about RESTier at our [Github issues](https://github.com/OData/RESTier/issues). | ||
|
||
## 2. Bug reports | ||
When reporting a bug at the issue tracker, fill the template of issue. The issue related to other libraries should not be reported in RESTier library issue tracker, but be reported to other libraries' issue tracker. | ||
|
||
## 3. Pull request for code and document contribution | ||
**Pull request is the only way we accept code and document contribution.** Pull request of document, features and bug fixes are both welcomed. Refer to this [link](https://help.github.com/articles/using-pull-requests/) to learn details about pull request. Before you send a pull request to us, you need to make sure you've followed the steps listed below. | ||
|
||
### Pick an issue to work on | ||
You should either create or pick an issue on the [issue tracker](https://github.com/OData/RESTier/issues) before you work on the pull request. After the RESTier team has reviewed this issue and change its label to "accepting pull request", you can work on the code change. | ||
|
||
### Prepare Tools | ||
[Atom](https://atom.io/) with package [atom-beautify](https://atom.io/packages/atom-beautify) and [markdown-toc](https://atom.io/packages/markdown-toc) is recommended to edit the document. [MarkdownPad](http://www.markdownpad.com/) can also be used to edit the document.<br />Visual Studio 2015 is recommended for code contribution. | ||
|
||
### Steps to create a pull request | ||
These are the recommended steps to create a pull request:<br /> | ||
|
||
1. Create a forked repository of [https://github.com/OData/RESTier.git](https://github.com/OData/RESTier.git) | ||
2. Clone the forked repository into your local environment | ||
3. Add a git remote to upstream for local repository with command _git remote add upstream [https://github.com/OData/RESTier.git](https://github.com/OData/RESTier.git)_ | ||
4. Make code changes and add test cases, refer Test specification section for more details about test | ||
5. Test the changed codes with one-click build and test script | ||
6. Commit changed code to local repository with clear message | ||
7. Rebase the code to upstream via command _git pull --rebase upstream master_ and resolve conflicts if there is any then continue rebase via command _git pull --rebase continue_ | ||
8. Push local commit to the forked repository | ||
9. Create pull request from forked repository Web console via comparing with upstream. | ||
10. Complete a Contributor License Agreement (CLA), refer below section for more details. | ||
11. Pull request will be reviewed by Microsoft OData team | ||
12. Address comments and revise code if necessary | ||
13. Commit the changes to local repository or amend existing commit via command _git commit --amend_ | ||
14. Rebase the code with upstream again via command _git pull --rebase upstream master_ and resolve conflicts if there is any then continue rebase via command _git pull --rebase continue_ | ||
15. Test the changed codes with one-click build and test script again | ||
16. Push changes to the forked repository and use _--force_ option if existing commit is amended | ||
17. Microsoft OData team will merge the pull request into upstream | ||
|
||
### Test specification | ||
All tests need to be written with xUnit. Here are some rules to follow when you are organizing the test code: | ||
- **Project name correspondence** (`X -> X.Tests`). For instance, all the test code of the `Microsoft.Restier.Core` project should be placed in the `Microsoft.Restier.Core.Tests` project. Path and file name correspondence. (`X/Y/Z/A.cs -> X.Tests/Y/Z/ATests.cs`). For example, the test code of the `ConventionBasedApiModelBuilder` class (in the `Microsoft.Restier.Core/Convention/ConventionBasedApiModelBuilder.cs` file) should be placed in the `Microsoft.Restier.Core.Tests/Convention/ConventionBasedApiModelBuilderTests.cs` file. | ||
- **Namespace correspondence** (`X.Tests/Y/Z -> X.Tests.Y.Z`). The namespace of the file should strictly follow the path. For example, the namespace of the `ConventionBasedApiModelBuilderTests.cs` file should be `Microsoft.Restier.Core.Tests.Convention`. | ||
- **Utility classes**. The file for a utility class can be placed at the same level of its user or a shared level that is visible to all its users. But the file name must **NOT** be ended with `Tests` to avoid any confusion. | ||
- **Integration and scenario tests**. Those tests usually involve multiple modules and have some specific scenarios. They should be placed separately in `X.Tests/IntegrationTests` and `X.Tests/ScenarioTests`. There is no hard requirement of the folder structure for those tests. But they should be organized logically and systematically as possible. | ||
|
||
### Complete a Contribution License Agreement (CLA) | ||
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. | ||
|
||
Please submit a Contributor License Agreement (CLA) before submitting a pull request. Download the agreement ([Microsoft Contribution License Agreement.pdf](https://github.com/odata/odatacpp/wiki/files/Microsoft Contribution License Agreement.pdf)), sign, scan, and email it back to [[email protected]](mailto:[email protected]). Be sure to include your Github user name along with the agreement. Only after we have received the signed CLA, we'll review the pull request that you send. You only need to do this once for contributing to any Microsoft open source projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
*Short summary (3-5 sentences) describing the issue.* | ||
|
||
### Assemblies affected | ||
*Which assemblies and versions are known to be affected e.g. RESTier 0.4.0-rc2.* | ||
|
||
### Reproduce steps | ||
*The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.* | ||
|
||
### Expected result | ||
*What would happen if there wasn't a bug.* | ||
|
||
### Actual result | ||
*What is actually happening.* | ||
|
||
### Additional details | ||
*Optional, details of the root cause if known. Delete this section if you have no additional details to add.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### Issues | ||
*This pull request fixes issue #xxx.* | ||
|
||
### Description | ||
*Briefly describe the changes of this pull request.* | ||
|
||
### Checklist (Uncheck if it is not completed) | ||
- [ x ] Test cases added | ||
- [ x ] Build and test with one-click build and test script passed | ||
|
||
### Additional work necessary | ||
*If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,73 @@ | ||
RESTier | ||
=============== | ||
# RESTier | ||
## 1. Introduction | ||
[OData](http://www.odata.org/ "OData") stands for the Open Data Protocol. It was initiated by Microsoft and is now an ISO and OASIS standard. OData enables the creation and consumption of RESTful APIs, which allow resources, defined in a data model and identified by using URLs, to be published and edited by Web clients using simple HTTP requests. | ||
|
||
## What is RESTier | ||
RESTier is a RESTful API development framework for building standardized, OData V4 based REST services on .NET. It can be seen as a middle-ware on top of Web API OData. RESTier can provide convenience to bootstrap an OData service and add business logic like what WCF Data Services does as well as flexibily and easy customization like what Web API OData does. | ||
RESTier is a RESTful API development framework for building standardized, OData V4 based RESTful services on .NET platform. It can be seen as a middle-ware on top of Web API OData. RESTier provides facilities to bootstrap an OData service like what WCF Data Services (which is sunset) does, beside this, it supports to add business logic in several simple steps, has flexibily and easy customization like what Web API OData do. It also supports to add additional publishers to support other protocols and additional providers to support other data sources. | ||
|
||
For more information about OData, please refer to the following resources: | ||
- [OData.org](http://www.odata.org/) | ||
- [OASIS Open Data Protocol (OData) Technical Committee](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata) | ||
|
||
**For how to adopt this library to build OData service, please refer to the following resources:** | ||
- [Build an OData v4 Service with RESTier Library](http://odata.github.io/RESTier/#01-01-Introduction) | ||
|
||
**For how to adopt .NET OData Client to consume OData service, please refer to the following resources:** | ||
- [OData .Net Client](http://odata.github.io/odata.net/#04-01-basic-crud-operations) | ||
|
||
Please be noted that currently RESTier is still a preview version. | ||
|
||
## How to build | ||
## 2. Project structure | ||
The project currently has two branches: [master](https://github.com/OData/RESTier/tree/master), [gh-pages](https://github.com/OData/RESTier/tree/gh-pages). | ||
|
||
**master branch** | ||
|
||
The master branch has the following libraries: | ||
- [RESTier Core](https://www.nuget.org/packages/Microsoft.Restier.Core/) (namespace `Microsoft.Restier.Core`):<br />The RESTier Core contains framework classes like API-related logic, query inspector/filter/expander/sourcer/executor, convention-based logic like model builder. | ||
- [RESTier WebApi Publisher](https://www.nuget.org/packages/Microsoft.Restier.WebApi/) (namespace `Microsoft.Restier.WebApi`):<br />The RESTier WebApi Publisher contains classes to publish the data source as an OData service based on Web API OData. | ||
- [RESTier EntityFramework Provider](https://www.nuget.org/packages/Microsoft.Restier.EntityFramework/) (namespace `Microsoft.Restier.EntityFramework`):<br />The RESTier EntityFramework Provider contains classes to access data sources exposed with Entity Framework library. | ||
- [RESTier Security](https://www.nuget.org/packages/Microsoft.Restier.Security/) (namespace `Microsoft.Restier.Security`):<br />The RESTier Security contains classes and methods for security control, it is not in active development state and will not be part of first GA release. | ||
|
||
For these libraries, we accept bug reports, feature requirements and pull requests. | ||
|
||
|
||
**gh-pages branch** | ||
|
||
The gh-pages branch contains documentation source for RESTier - tutorials, guides, etc. The documentation source is in Markdown format. It is hosted at [RESTier Pages](http://odata.github.io/RESTier "RESTier Pages"). | ||
|
||
## 3. Building, Testing, Debugging and Release | ||
LocalDB v12.0 or above will be used which is part of VS2015 and no additional installation is needed. The Database will be automatically initialized by the test code if it doesn't exist. | ||
|
||
### 3.1 Building and Testing in Visual Studio | ||
Simply open the solution files in root folder and build them in Visual Studio 2015. | ||
|
||
Here is the usage of each solution file: | ||
- RESTier.sln - Product source and all tests. It uses EntityFramework 6.x and built with .Net Framework version 4.5.1. | ||
- RESTier.EF7.sln - Product source and all tests. It uses EntityFramework 7.x and built with .Net Framework version 4.5.1. | ||
|
||
### 3.2 One-click build in command line | ||
Open Command Line Window, cd to the root folder and run following command: | ||
|
||
``` | ||
build.cmd | ||
``` | ||
|
||
The build will take about 4 minutes. Tests are recommended to run with Visual Studio. | ||
|
||
You can build the project either from command line with ./build.cmd, or from Visual Studio. | ||
### 3.3 Debug | ||
Please refer to the [How to debug](http://odata.github.io/WebApi/10-01-debug-webapi-source). | ||
|
||
## Documentation / Tutorials | ||
### 3.4 Official Release | ||
The release of the component binaries is carried out regularly through [Nuget](http://www.nuget.org/). | ||
|
||
Please refer to the [RESTier pages](http://odata.github.io/RESTier/). | ||
## 4. Documentation | ||
Please visit the [RESTier pages](http://odata.github.io/RESTier). It has detailed descriptions on each feature provided by RESTier. | ||
|
||
## Call to action | ||
## 5. Community | ||
### 5.1 Contribution | ||
There are many ways for you to contribute to RESTier. The easiest way is to participate in discussion of features and issues. You can also contribute by sending pull requests of features or bug fixes to us. Contribution to the documentations is also highly welcomed. Please refer to the [CONTRIBUTING.md](https://github.com/OData/RESTier/blob/master/.github/CONTRIBUTING.md) for more details. | ||
|
||
RESTier is fully open sourced, please following the [contribution guide](https://github.com/OData/RESTier/wiki/Contribute-to-RESTier) to contribute / provide feedback to RESTier. | ||
### 5.2 Support | ||
- Issues<br />Report issues on [Github issues](https://github.com/OData/RESTier/issues). | ||
- Questions<br />Ask questions on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=odata). | ||
- Feedback<br />Please send mails to [[email protected]](mailto:[email protected]). | ||
- Team blog<br />Please visit [http://blogs.msdn.com/b/odatateam/](http://blogs.msdn.com/b/odatateam/) and [http://www.odata.org/blog/](http://www.odata.org/blog/). |