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

Add entitlements APIs and resources to TypeSpec #1537

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

GAlexIHU
Copy link
Contributor

@GAlexIHU GAlexIHU commented Sep 18, 2024

Overview

Implements the entitlements related APIs in TypeSpec

Notes for reviewer

TypeSpec doesn't cover 100% of OAPI3 which results in some differences in the generated output.

  • Some previously unnamed interfaces had to be extracted to models
  • TypeSpec doesn't support arbitrary allOf types so the lastReset prop on getEntitlement's return value isn't on top level anymore

@GAlexIHU GAlexIHU added area/api release-note/misc Miscellaneous changes labels Sep 18, 2024
@GAlexIHU GAlexIHU changed the title feat: add feature and grant Add entitlements APIs and resources to TypeSpec Sep 18, 2024
@GAlexIHU GAlexIHU marked this pull request as ready for review September 19, 2024 13:16
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Outdated Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/types.tsp Outdated Show resolved Hide resolved
api/spec/src/types.tsp Show resolved Hide resolved
api/spec/src/types.tsp Outdated Show resolved Hide resolved
api/spec/src/entitlements/management.tsp Outdated Show resolved Hide resolved
@tothandras tothandras force-pushed the feat/entitlements-typespec branch 2 times, most recently from 84e9c50 to cedebfe Compare September 20, 2024 14:12
Copy link
Contributor

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general comment on naming:

  • EntitlementCreateInputs -> CreateEntitlementRequest (or NewEntitlement)
  • EntitlementStatic -> StaticEntitlement

These names feel more natural to me.

While I realize these are breaking changes for OpenAPI, due to friendly name we can make these changes in TypeSpec. (Can be delayed, but please create a task somewhere)

It would be interesting to see if we can use TypeSpec for better server side code generation.

api/spec/src/cloud/main.tsp Outdated Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Show resolved Hide resolved
api/spec/src/entitlements/entitlements.tsp Outdated Show resolved Hide resolved
feat: write entitlement types and base endpoints

feat: add management apis

chore: address PR comments

chore(api): entitlements nits
@GAlexIHU GAlexIHU merged commit e4cfb83 into main Sep 23, 2024
18 checks passed
@GAlexIHU GAlexIHU deleted the feat/entitlements-typespec branch September 23, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api release-note/misc Miscellaneous changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants