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

components@security_schemes object #45

Closed
jonthegeek opened this issue Sep 12, 2023 · 2 comments · Fixed by #57
Closed

components@security_schemes object #45

jonthegeek opened this issue Sep 12, 2023 · 2 comments · Fixed by #57

Comments

@jonthegeek
Copy link
Owner

jonthegeek commented Sep 12, 2023

As an API user, I'd like to create standardized API components@security_schemes objects, so that I don't have to remember the names of all the expected fields.

Make an incomplete version of components that only implements security_schemes. We'll come back for the rest later.

The scheme for this includes 4 types, which will be subclasses of a security_scheme class or something along those lines.

Be sure to sort out rules about things like security_schemes and security_scheme both being classes (that feels bad). Maybe make the top one something like security_scheme_set or security_scheme_collection ("set" has too many meanings).

Align with variables.

@jonthegeek jonthegeek added this to the 0.1 milestone Sep 12, 2023
@jonthegeek
Copy link
Owner Author

Of all OAS 3.0+ specs on apis.guru, this is the breakdown of securityShemes types:

  • apiKey: 1041
  • oauth2: 611
  • http: 194
  • openIdConnect: 4

It's definitely best to start focused on apiKey!

(note that some don't have a scheme; I haven't gotten those counts yet)

@jonthegeek
Copy link
Owner Author

Number of securitySchemes per API:

  • 0: 318
  • 1: 576
  • 2: 579
  • 3: 27
  • 4: 5
  • 5: 3

jonthegeek added a commit that referenced this issue Oct 4, 2023
jonthegeek added a commit that referenced this issue Oct 4, 2023
* Implement security_schemes.

Closes #45.

* Add work on oauth2 schemes.

* Use collate.

* Rename `in` param to "location".

* Clean test names.

* Document ouath classes.

* Lengths and as's.

* Refactor.

* Massive security_scheme reorg.

* Standardize to "description".

Vs "document" or "definition", per discussion on the open-api Slack.

* Ouath2 tests.

* Add as_security_scheme_collection()

And most of its infrastructure.

* Finish security_scheme_collection().

* Finish security_scheme_details().

* Finish as_security_scheme().

And standardize as_* documentation.

* Remove extra noise from tests.

* Use as_*() in constructors.

* Implement oauth2_security_scheme and friends.

* Abstract my general as_*() functions

* More work finishing auth components.

* Finish tests for flows.

* Finish security scheme tests.

* Add components.

* Note use of snakecase in as_* documentation.

* Log TODOs as issues on GH.

* Add components to rapid().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant