Skip to content

feat: use nullable limits and openapi-compliant uniqueness for access schema #208

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

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

njlie
Copy link
Contributor

@njlie njlie commented Nov 3, 2022

Addresses (but doesn't really fix) interledger/rafiki#630. This spec is less strict to allow valid responses from the AS to pass validation, but is a bit too loose for what we actually want to achieve with it. The main restriction that this doesn't cover is:

  • The spec does not restrict a grant to (at most) one of each type of access.

@@ -259,6 +242,7 @@ components:
title: limits-outgoing
description: Open Payments specific property that defines the limits under which outgoing payments can be created.
type: object
nullable: true
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm struggling to find nullable in OpenAPI or JSON Schema docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like nullable was removed in OpenAPI 3.1
https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0

type: object
type:
- object
- null
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on examples, I'm seeing at least null (and maybe object) might need to be a "value"

Suggested change
- null
- 'null'

OAI/OpenAPI-Specification#2244 (comment)

Not sure if that will resolve the validator errors

@njlie njlie merged commit 62c4b4a into main Nov 3, 2022
@njlie njlie deleted the nl-revert-jsonschema-restrictions branch November 3, 2022 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants