Skip to content
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

Set deprecated property for operations that have been deprecated #113

Closed
darrelmiller opened this issue Aug 24, 2021 · 4 comments · Fixed by #155
Closed

Set deprecated property for operations that have been deprecated #113

darrelmiller opened this issue Aug 24, 2021 · 4 comments · Fixed by #155
Assignees
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Milestone

Comments

@darrelmiller
Copy link
Member

No description provided.

@darrelmiller darrelmiller added the type:enhancement Enhancement request targeting an existing experience. label Aug 24, 2021
@baywet baywet added this to the 1.0.10 milestone Nov 23, 2021
@baywet baywet self-assigned this Dec 9, 2021
@baywet
Copy link
Member

baywet commented Dec 9, 2021

note: here is the annotation we're looking to translate

<Annotation Term="Org.OData.Core.V1.Revisions">
          <Collection>
            <Record>
              <PropertyValue Date="2021-08-24" Property="Date" />
              <PropertyValue Property="Description" String="The identityProvider API is deprecated and will stop returning data on March 2023. Please use the new identityProviderBase API." />
              <PropertyValue Property="Kind">
                <EnumMember>Org.OData.Core.V1.RevisionKind/Deprecated</EnumMember>
              </PropertyValue>
              <PropertyValue Date="2023-03-15" Property="RemovalDate" />
              <PropertyValue Property="Version" String="2021-05/identityProvider" />
            </Record>
          </Collection>
        </Annotation>

It should translate into a deprecated: true property on the operation/path item.

Related work microsoft/Vipr#146

@baywet
Copy link
Member

baywet commented Dec 13, 2021

@baywet
Copy link
Member

baywet commented Dec 14, 2021

openapi.net currently only supports OpenAPI 3.0 which only supports json schema draft 4, which doesn't have a deprecated property (added in draft 9) on schemas or properties.
OpenAPI 3.1 supports draft 12, and work is in progress to add support for it in OpenAPI.net.

For the time being the conversion process will add the deprecated property and the x- extension only on operations. It will do so by propagating the information to derived types, entity sets, navigation properties and singletons.

At a later time, when OpenAPI 3.1 is supported by openapi.net, the conversion process might add the deprecated property and x- extension to schemas/properties as well.

@baywet baywet added the fixed label Dec 15, 2021
@baywet
Copy link
Member

baywet commented Dec 15, 2021

fixed via #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants