-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add schemas for
registry_package
event, update package
even…
…t with new information (#747) * feat: new updated examples for `package` and `registry_package` events * feat: add schemas for `registry_package` event * feat: update `package` event schemas updates taken from /~https://github.com/github/rest-api-description/blob/d25cb45e5887715dd1b0d57a07de4b9e76ec5ec1/descriptions-next/api.github.com/api.github.com.json * build: generate types * fix: the `package_type` is now in caps for containers * fix: add `package_url` property to `package` event * fix: add missing properties to `registry_package` event * fix: move the `description` to be outside the `oneOf` * build: generate types * fix: specify `additionalProperties` to be type `string`
- Loading branch information
Showing
11 changed files
with
2,892 additions
and
250 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
374 changes: 374 additions & 0 deletions
374
payload-examples/api.github.com/package/published.docker.payload.json
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
374 changes: 374 additions & 0 deletions
374
payload-examples/api.github.com/registry_package/published.docker.payload.json
Large diffs are not rendered by default.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
payload-schemas/api.github.com/common/package-npm-metadata.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "common/package-npm-metadata.schema.json", | ||
"type": "object", | ||
"properties": { | ||
"name": { "type": "string" }, | ||
"version": { "type": "string" }, | ||
"npm_user": { "type": "string" }, | ||
"author": { | ||
"oneOf": [ | ||
{ "type": "object", "additionalProperties": { "type": "string" } }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"bugs": { | ||
"oneOf": [ | ||
{ "type": "object", "additionalProperties": { "type": "string" } }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"dependencies": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
}, | ||
"dev_dependencies": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
}, | ||
"peer_dependencies": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
}, | ||
"optional_dependencies": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
}, | ||
"description": { "type": "string" }, | ||
"dist": { | ||
"oneOf": [ | ||
{ "type": "object", "additionalProperties": { "type": "string" } }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"git_head": { "type": "string" }, | ||
"homepage": { "type": "string" }, | ||
"license": { "type": "string" }, | ||
"main": { "type": "string" }, | ||
"repository": { | ||
"oneOf": [ | ||
{ "type": "object", "additionalProperties": { "type": "string" } }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"scripts": { "type": "object" }, | ||
"id": { "type": "string" }, | ||
"node_version": { "type": "string" }, | ||
"npm_version": { "type": "string" }, | ||
"has_shrinkwrap": { "type": "boolean" }, | ||
"maintainers": { "type": "array", "items": { "type": "object" } }, | ||
"contributors": { "type": "array", "items": { "type": "object" } }, | ||
"engines": { | ||
"type": "object", | ||
"additionalProperties": { "type": "string" } | ||
}, | ||
"keywords": { "type": "array", "items": { "type": "string" } }, | ||
"files": { "type": "array", "items": { "type": "string" } }, | ||
"bin": { "type": "object" }, | ||
"man": { "type": "object" }, | ||
"directories": { | ||
"oneOf": [ | ||
{ "type": "object", "additionalProperties": { "type": "string" } }, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"os": { "type": "array", "items": { "type": "string" } }, | ||
"cpu": { "type": "array", "items": { "type": "string" } }, | ||
"readme": { "type": "string" }, | ||
"installation_command": { "type": "string" }, | ||
"release_id": { "type": "integer" }, | ||
"commit_oid": { "type": "string" }, | ||
"published_via_actions": { "type": "boolean" }, | ||
"deleted_by_id": { "type": "integer" } | ||
}, | ||
"additionalProperties": false, | ||
"title": "Package NPM Metadata" | ||
} |
35 changes: 35 additions & 0 deletions
35
payload-schemas/api.github.com/common/package-nuget-metadata.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "common/package-nuget-metadata.schema.json", | ||
"type": "object", | ||
"required": [], | ||
"properties": { | ||
"id": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ "type": "object" }, | ||
{ "type": "integer" } | ||
] | ||
}, | ||
"name": { "type": "string" }, | ||
"value": { | ||
"oneOf": [ | ||
{ "type": "boolean" }, | ||
{ "type": "string" }, | ||
{ "type": "integer" }, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"url": { "type": "string" }, | ||
"branch": { "type": "string" }, | ||
"commit": { "type": "string" }, | ||
"type": { "type": "string" } | ||
}, | ||
"additionalProperties": false | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"title": "Package Nuget Metadata" | ||
} |
Oops, something went wrong.