Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

JSON-LD / RDF support

オープン
#1,483 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か

調査の方向性

このIssueでは、リポジトリのファイル、テスト、エントリーポイントが指定されていません。まず、APIがAcceptヘッダーとレスポンス形式をどのように処理しているかを追跡し、次にJSON-LD表現とオントロジーの範囲を特定してください。合意された実装計画と、要求されたJSON-LD形式のサポートが整えば完了です。

索引モデルが issue の本文から書いたものです。

説明

I think it would be valuable to be able to use a PokéAPI endpoint as a canonical URL within RDF linked data, so other RDF documents can refer to Pokémon concepts. For example, someone could make character bios using JSON-LD that look like:

{
  "@context": {
    "@vocab": "https://schema.org/",
    "pkmn": "https://pokemonkg.org/ontology/version/1.0.0"
  },
  "@id": "<...>",
  "@type": "Person",
  "name": "Meowth",
  "description": "Team Rocket's Meowth",
  "url": "https://bulbapedia.bulbagarden.net/wiki/Meowth_(Team_Rocket)",
  "pkmn:species": { "@id": "https://pokeapi.co/api/v2/pokemon-species/meowth" },
  "gender": { "@id": "https://schema.org/Male" },
  "memberOf": {
    "@type": "Organization",
    "name": "Team Rocket",
    "url": "https://bulbapedia.bulbagarden.net/wiki/Team_Rocket"
  },
  "knows": {
    "@id": "<...>",
    "@type": "Person",
    "name": "Meowzie",
    "url": "https://bulbapedia.bulbagarden.net/wiki/Meowzie",
    "pkmn:species": { "@id": "https://pokeapi.co/api/v2/pokemon-species/meowth" },
    "gender": { "@id": "https://schema.org/Female" }
  }
}

This would be very useful for creating original characters in a somewhat-standard machine-readable format, e.g. for use in TTRPG campaigns.

Some notes:

  • There is a readily available Pokémon ontology for RDF, but we could extend it or make our own for PokéAPI if it doesn't have all the features we need.
  • In the example above, I used the Person type from Schema.org (https://schema.org/Person) as it integrates with the rest of the Schema.org ontology - for example, the CreativeWork.character property takes a Person as its value to represent a character within a creative work. However, the Comic Book Ontology also provides a dedicated Character type (https://comicmeta.org/cbo/#Character).

Similar to MusicBrainz, a client could request the JSON-LD for a Pokémon concept by modifying its HTTP request in the following form:

GET /api/v2/pokemon-species/meowth HTTP/2
Host: pokeapi.co
Accept: application/ld+json

or alternatively append ?format=json-ld to the resource URL.

主要言語
Python
スター
5.4k
フォーク
1.2k
平均マージ
2日 12時間
マージ済み PR(30日)
18

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PokeAPI/pokeapi のほかの issue

PokeAPI/pokeapi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。