-
Notifications
You must be signed in to change notification settings - Fork 283
Refactor OpenApiDiagnostic out of ParsingContext #30
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
Changes from all commits
5bd0463
3dbeb56
10c92a1
34f7f17
3ceb809
f7f49e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // ------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
| // ------------------------------------------------------------ | ||
|
|
||
| using System.Collections.Generic; | ||
| using Microsoft.OpenApi.Readers.Interface; | ||
|
|
||
| namespace Microsoft.OpenApi.Readers.YamlReaders | ||
| { | ||
| public class OpenApiDiagnostic : IDiagnostic | ||
|
Contributor
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. Public the interface, but internal the implement. Right?
Contributor
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. This should be public I believe. The consumer should have access to the Diagnostic. This is one of the reasons it gets refactored out of ParsingContext
Contributor
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. Put the things customers want to access into interface, hide the detail in the implementation?
Contributor
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. We don't know what the customers want. That's why the Interface has nothing. Each reader can implement its own IDiagnostic |
||
| { | ||
| public IList<OpenApiError> Errors { get; set; } = new List<OpenApiError>(); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the copyright is different with the core. Which one do we should take?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.opensource.microsoft.com/releasing/copyright-headers.html suggests this:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.