Skip to content

Commit

Permalink
Add a README in nuspec (OData#3152)
Browse files Browse the repository at this point in the history
* Add README to NuGet package
  • Loading branch information
WanjohiSammy authored Jan 7, 2025
1 parent b06ccb3 commit f6c064a
Show file tree
Hide file tree
Showing 16 changed files with 370 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>LINQ-enabled client API for issuing OData queries and consuming OData JSON payloads. Supports OData v4 and v4.01. </summary>
<description>LINQ-enabled client API for issuing OData queries and consuming OData JSON payloads. Supports OData v4 and v4.01. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -28,6 +29,8 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$ProductRoot$\Microsoft.OData.Client.xml" target="lib" />
<file src="$ProductRoot$\Microsoft.OData.Client.pdb" target="lib" />
<file src="$SourcesRoot$\src\Microsoft.OData.Client\**\*.cs" target="src\Microsoft.OData.Client" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Client\Docs\README.md" target="docs\" />
<!-- files imported from EdmLib -->
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueParser.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueParser.cs" />
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>LINQ-enabled client API for issuing OData queries and consuming OData JSON payloads. Supports OData v4 and v4.01. </summary>
<description>LINQ-enabled client API for issuing OData queries and consuming OData JSON payloads. Supports OData v4 and v4.01. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -30,6 +31,8 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$ProductRoot$\Microsoft.OData.Client.xml" target="lib" />
<file src="$ProductRoot$\Microsoft.OData.Client.pdb" target="lib" />
<file src="$SourcesRoot$\src\Microsoft.OData.Client\**\*.cs" target="src\Microsoft.OData.Client" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Client\Docs\README.md" target="docs\" />
<!-- files imported from EdmLib -->
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueParser.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueParser.cs" />
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" />
Expand Down
78 changes: 78 additions & 0 deletions src/Microsoft.OData.Client/Docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Microsoft.OData.Client

The `Microsoft.OData.Client` library allows you to consume data from and interact with OData services from .NET applications. It provides LINQ-enabled client APIs for issuing OData queries and constructing and consuming OData JSON payloads. It supports OData [`v4` and `v4.01`](https://www.odata.org/documentation/).

## Installation

You can install the `Microsoft.OData.Client` package via NuGet:

```sh
dotnet add package Microsoft.OData.Client
```

Or via the NuGet Package Manager Console:

```sh
Install-Package Microsoft.OData.Client
```

## Getting Started

### Creating an OData Client

To create an OData client, you can use the [`OData Connected Service` in `Visual Studio`](https://learn.microsoft.com/odata/connectedservice/getting-started) to generate strongly-typed client code for your OData service.

1. **Install the OData Connected Service extension**:
- Go to the `Extensions` menu in `Visual Studio`.
- Select `Manage Extensions`.
- Search for `OData Connected Service` and install it.
- Alternatively, you can get the extension at Visual Studio Marketplace: [OData Connected Service](https://marketplace.visualstudio.com/items?itemName=marketplace.ODataConnectedService) and [OData Connected Service 2022+](https://marketplace.visualstudio.com/items?itemName=marketplace.ODataConnectedService2022)

2. **Add the OData Connected Service to your project**:
- Right-click your project in the Solution Explorer.
- Select Add > Connected Service.
- Choose OData Connected Service and follow the wizard to configure your service.


### Example Usage

Here's a simple example of how to use the generated client to interact with an OData service:

```csharp
using Microsoft.OData.SampleService.Models.TripPin;

var serviceUri = new Uri("https://services.odata.org/V4/TripPinServiceRW/");
var context = new DefaultContainer(serviceUri);

// Querying data
var people = await context.People.ExecuteAsync();
foreach (var person in people)
{
Console.WriteLine($"{person.FirstName} {person.LastName}");
}
```

## Documentation

For more detailed information, please refer to the [official documentation](https://learn.microsoft.com/odata/client/getting-started)

## Community

### Contribution

There are many ways for you to contribute to [`OData .NET`](https://github.com/OData/odata.net). 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/odata.net/blob/main/.github/CONTRIBUTING.md) for more details.

### Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <[email protected]>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue).

### 5.3 Support

- **Issues**: Report issues on [Github issues](https://github.com/OData/odata.net/issues).
- **Questions**: Ask questions on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=odata).
- **Feedback**: Please send mails to [[email protected]](mailto:[email protected]).
- **Team blog**: Please visit [https://devblogs.microsoft.com/odata/](https://devblogs.microsoft.com/odata/) and [http://www.odata.org/blog/](http://www.odata.org/blog/).

### Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
11 changes: 6 additions & 5 deletions src/Microsoft.OData.Client/Microsoft.OData.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<AssemblyName>Microsoft.OData.Client</AssemblyName>
<RootNamespace>Microsoft.OData.Client</RootNamespace>
<DocumentationFile>$(AssemblyName).xml</DocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<DefineConstants>$(DefineConstants);ODATA_CLIENT;SUPPRESS_PORTABLELIB_TARGETFRAMEWORK_ATTRIBUTE;DelaySignKeys</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down Expand Up @@ -103,10 +102,6 @@
<Compile Include="..\Microsoft.OData.Core\UriParser\SyntacticAst\CountSegmentToken.cs" Link="ALinq\UriParser\SyntacticAst\CountSegmentToken.cs" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" />
Expand Down Expand Up @@ -148,5 +143,11 @@
<DependentUpon>SRResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<None Update="Docs\README.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>Classes to serialize, deserialize and validate OData JSON payloads. Supports OData v4 and v4.01.</summary>
<description>Classes to serialize, deserialize and validate OData JSON payloads. Supports OData v4 and v4.01. Enables construction of OData services and clients. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -33,5 +34,7 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" />
<file src="$SourcesRoot$\src\PlatformHelper.cs" target="src\PlatformHelper.cs" />
<file src="$SourcesRoot$\src\AssemblyInfo\AssemblyMetadataAttribute.cs" target="src\AssemblyMetadataAttribute.cs" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Core\Docs\README.md" target="docs\" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>Classes to serialize, deserialize and validate OData JSON payloads. Supports OData v4 and v4.01.</summary>
<description>Classes to serialize, deserialize and validate OData JSON payloads. Supports OData v4 and v4.01. Enables construction of OData services and clients. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -33,5 +34,7 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" target="src\Microsoft.OData.Edm\Csdl\EdmValueWriter.cs" />
<file src="$SourcesRoot$\src\PlatformHelper.cs" target="src\PlatformHelper.cs" />
<file src="$SourcesRoot$\src\AssemblyInfo\AssemblyMetadataAttribute.cs" target="src\AssemblyMetadataAttribute.cs" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Core\Docs\README.md" target="docs\" />
</files>
</package>
50 changes: 50 additions & 0 deletions src/Microsoft.OData.Core/Docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Microsoft.OData.Core

The `Microsoft.OData.Core` library is a core component of the `OData .NET libraries`, providing classes to serialize, deserialize and validate OData JSON payloads. It supports OData [`v4` and `v4.01`](https://www.odata.org/documentation/).

This library, implements functionality read and write OData messages (i.e. requests and responses). It reads and writes payloads in OData JSON format. The library exposes, among others, the `ODataMessageReader` and `ODataMessageWriter` classes.

## Installation

You can install the `Microsoft.OData.Core` package via NuGet:

```sh
dotnet add package Microsoft.OData.Core
```

Or via the NuGet Package Manager Console:

```sh
Install-Package Microsoft.OData.Core
```

## Getting Started

### Creating an OData Service

To create an OData service, you can use the `Microsoft.OData.Core` library along with other OData libraries like `Microsoft.OData.Edm` and `Microsoft.OData.Client`.

## Documentation

For more detailed information, please refer to the [official documentation](https://learn.microsoft.com/Odata/odatalib/write-payload) or [`OData documentation`](https://learn.microsoft.com/odata)

## Community

### Contribution

There are many ways for you to contribute to [`OData .NET`](https://github.com/OData/odata.net). 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/odata.net/blob/main/.github/CONTRIBUTING.md) for more details.

### Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <[email protected]>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue).

### 5.3 Support

- **Issues**: Report issues on [Github issues](https://github.com/OData/odata.net/issues).
- **Questions**: Ask questions on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=odata).
- **Feedback**: Please send mails to [[email protected]](mailto:[email protected]).
- **Team blog**: Please visit [https://devblogs.microsoft.com/odata/](https://devblogs.microsoft.com/odata/) and [http://www.odata.org/blog/](http://www.odata.org/blog/).

### Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
11 changes: 6 additions & 5 deletions src/Microsoft.OData.Core/Microsoft.OData.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<RootNamespace>Microsoft.OData.Core</RootNamespace>

<DocumentationFile>$(AssemblyName).xml</DocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<DefineConstants>$(DefineConstants);ODATA_CORE;SUPPRESS_PORTABLELIB_TARGETFRAMEWORK_ATTRIBUTE;DelaySignKeys</DefineConstants>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -27,10 +26,6 @@
<InternalsVisibleTo Include="Microsoft.OData.Core.Tests" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup>
<Compile Include="..\AssemblyInfo\AssemblyKeys.cs" Link="AssemblyKeys.cs" />
<Compile Include="..\PlatformHelper.cs" Link="PlatformHelper.cs" />
Expand Down Expand Up @@ -86,4 +81,10 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="Docs\README.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>Classes to represent, construct, parse, serialize and validate entity data models. Supports OData v4 and v4.01.</summary>
<description>Classes to represent, construct, parse, serialize and validate entity data models. Supports OData v4 and v4.01. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -29,5 +30,7 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\**\*.cs" target="src\Microsoft.OData.Edm\" />
<file src="$SourcesRoot$\src\PlatformHelper.cs" target="src\PlatformHelper.cs" />
<file src="$SourcesRoot$\src\AssemblyInfo\AssemblyMetadataAttribute.cs" target="src\AssemblyMetadataAttribute.cs" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Docs\README.md" target="docs\" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<projectUrl>http://odata.github.io/</projectUrl>
<iconUrl>http://static.tumblr.com/hgchgxz/9ualgdf98/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<readme>docs\README.md</readme>
<summary>Classes to represent, construct, parse, serialize and validate entity data models. Supports OData v4 and v4.01.</summary>
<description>Classes to represent, construct, parse, serialize and validate entity data models. Supports OData v4 and v4.01. Targets .NET 8 or above.
OData .NET library is open source at http://github.com/OData/odata.net. Documentation for the library can be found at https://docs.microsoft.com/en-us/odata/.</description>
Expand All @@ -30,5 +31,7 @@ OData .NET library is open source at http://github.com/OData/odata.net. Document
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\**\*.cs" target="src\Microsoft.OData.Edm" />
<file src="$SourcesRoot$\src\PlatformHelper.cs" target="src\PlatformHelper.cs" />
<file src="$SourcesRoot$\src\AssemblyInfo\AssemblyMetadataAttribute.cs" target="src\AssemblyMetadataAttribute.cs" />
<!-- file README.md -->
<file src="$SourcesRoot$\src\Microsoft.OData.Edm\Docs\README.md" target="docs\" />
</files>
</package>
Loading

0 comments on commit f6c064a

Please sign in to comment.