-
Notifications
You must be signed in to change notification settings - Fork 717
Fix compiler and update Odata sample #1127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,13 @@ public IActionResult Get( ODataQueryOptions<Person> options ) => | |
| Email = "[email protected]", | ||
| Phone = "555-555-5555", | ||
| }, | ||
| new() { | ||
| Id = 2, | ||
| FirstName = "Xavier", | ||
| LastName = "John", | ||
| Email = "[email protected]", | ||
| Phone = "666-666-6666", | ||
| } | ||
| } ); | ||
|
|
||
| // GET ~/api/people/{key}?api-version=[1.0|2.0] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| @HostAddress = https://localhost:5001 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see how this file is necessary at all. The OpenAPI example supplants the need for it. While I'm not completely opposed to the idea, this file just feels one-off and out of sync with the other examples. I'm not convinced this is worth keeping - yet.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using .http file is the easiest way to make API calls and view the results.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I disagree. Running the OpenAPI examples are. This is highly inconsistent. Why just this one? Are you going to go add these for all example projects? |
||
|
|
||
| // Get all records | ||
| GET {{HostAddress}}/api/People?api-version=1.0 | ||
| Accept: application/json | ||
| ### | ||
|
|
||
| // Get all records | ||
| GET {{HostAddress}}/api/People?api-version=1.0&$top=1 | ||
| Accept: application/json | ||
| ### | ||
|
|
||
| // Select firstName | ||
| GET {{HostAddress}}/api/People?api-version=1.0&$select=firstName | ||
| Accept: application/json | ||
| ### | ||
|
|
||
|
|
||
| // By Key | ||
| GET {{HostAddress}}/api/People/5?api-version=1.0 | ||
| Accept: application/json | ||
| ### | ||
Uh oh!
There was an error while loading. Please reload this page.