api-platform/laravel 4.0: Error with 200 status code and dump
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
まず、提供された OpenAPI エンドポイントに対して npm init @api-platform/client http://php/api/docs.jsonopenapi src/ -- --generator vuetify を実行し、client generator が成功したレスポンスをどのように処理するかを確認します。完了条件は、コマンドが status-200 エラーを報告せずにドキュメント化されたレスポンスを処理することです。
索引モデルが issue の本文から書いたものです。
説明
API Platform version(s) affected: api-platform/laravel 4.0.14
Description
I keep on getting this error while trying to create vuetify resources:
{
api: Api { entrypoint: 'http://php/api/docs.jsonopenapi', resources: [] },
error: {
response: Response {
status: 200,
statusText: 'OK',
headers: Headers {
'access-control-allow-origin': '*',
'cache-control': 'no-cache, private',
'content-type': 'application/vnd.openapi+json; charset=utf-8',
date: 'Fri, 17 Jan 2025 09:28:25 GMT',
link: '<http://php/api/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"',
server: 'Caddy',
vary: 'Accept',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'transfer-encoding': 'chunked'
},
body: ReadableStream { locked: false, state: 'readable', supportsBYOB: true },
bodyUsed: false,
ok: true,
redirected: false,
type: 'basic',
url: 'http://php/api/docs.jsonopenapi'
}
},
response: Response {
status: 200,
statusText: 'OK',
headers: Headers {
'access-control-allow-origin': '*',
'cache-control': 'no-cache, private',
'content-type': 'application/vnd.openapi+json; charset=utf-8',
date: 'Fri, 17 Jan 2025 09:28:25 GMT',
link: '<http://php/api/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"',
server: 'Caddy',
vary: 'Accept',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'transfer-encoding': 'chunked'
},
body: ReadableStream { locked: false, state: 'readable', supportsBYOB: true },
bodyUsed: false,
ok: true,
redirected: false,
type: 'basic',
url: 'http://php/api/docs.jsonopenapi'
},
status: 200
}
How to reproduce
I use the following command: npm init @api-platform/client http://php/api/docs.jsonopenapi src/ -- --generator vuetify
Additional Context
The api documentation accessible at /api/docs.jsonopenapi:
{
"openapi": "3.1.0",
"info": {
"title": "API Platform",
"description": "My awesome API",
"contact": {
"name": "",
"url": "",
"email": ""
},
"license": {
"name": "",
"url": ""
},
"version": "1.0.0"
},
"servers": [
{
"url": "/",
"description": ""
}
],
"paths": {
"/api/candidates": {
"get": {
"operationId": "api_apicandidates_get_collection",
"tags": [
"Candidate"
],
"responses": {
"200": {
"description": "Candidate collection",
"content": {
"application/ld+json": {
"schema": {
"type": "object",
"properties": {
"member": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Candidate.jsonld"
}
},
"totalItems": {
"type": "integer",
"minimum": 0
},
"view": {
"type": "object",
"properties": {
"@id": {
"type": "string",
"format": "iri-reference"
},
"@type": {
"type": "string"
},
"first": {
"type": "string",
"format": "iri-reference"
},
"last": {
"type": "string",
"format": "iri-reference"
},
"previous": {
"type": "string",
"format": "iri-reference"
},
"next": {
"type": "string",
"format": "iri-reference"
}
},
"example": {
"@id": "string",
"type": "string",
"first": "string",
"last": "string",
"previous": "string",
"next": "string"
}
},
"search": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"template": {
"type": "string"
},
"variableRepresentation": {
"type": "string"
},
"mapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
},
"variable": {
"type": "string"
},
"property": {
"type": [
"string",
"null"
]
},
"required": {
"type": "boolean"
}
}
}
}
}
}
},
"required": [
"member"
]
}
},
"text/html": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Candidate"
}
}
}
}
}
},
"summary": "Retrieves the collection of Candidate resources.",
"description": "Retrieves the collection of Candidate resources.",
"parameters": [
{
"name": "page",
"in": "query",
"description": "The collection page number",
"required": false,
"deprecated": false,
"allowEmptyValue": true,
"schema": {
"type": "integer",
"default": 1
},
"style": "form",
"explode": false,
"allowReserved": false
}
],
"deprecated": false
},
"post": {
"operationId": "api_apicandidates_post",
"tags": [
"Candidate"
],
"responses": {
"201": {
"description": "Candidate resource created",
"content": {
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Candidate.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Candidate"
}
}
},
"links": {}
},
"400": {
"description": "Invalid input"
},
"422": {
"description": "Unprocessable entity"
}
},
"summary": "Creates a Candidate resource.",
"description": "Creates a Candidate resource.",
"parameters": [],
"requestBody": {
"description": "The new Candidate resource",
"content": {
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Candidate.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Candidate"
}
}
},
"required": true
},
"deprecated": false
}
},
"/api/candidates/{id}": {
"get": {
"operationId": "api_apicandidates_id_get",
"tags": [
"Candidate"
],
"responses": {
"200": {
"description": "Candidate resource",
"content": {
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Candidate.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Candidate"
}
}
}
},
"404": {
"description": "Resource not found"
}
},
"summary": "Retrieves a Candidate resource.",
"description": "Retrieves a Candidate resource.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Candidate identifier",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
},
"style": "simple",
"explode": false,
"allowReserved": false
}
],
"deprecated": false
},
"delete": {
"operationId": "api_apicandidates_id_delete",
"tags": [
"Candidate"
],
"responses": {
"204": {
"description": "Candidate resource deleted"
},
"404": {
"description": "Resource not found"
}
},
"summary": "Removes the Candidate resource.",
"description": "Removes the Candidate resource.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Candidate identifier",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
},
"style": "simple",
"explode": false,
"allowReserved": false
}
],
"deprecated": false
},
"patch": {
"operationId": "api_apicandidates_id_patch",
"tags": [
"Candidate"
],
"responses": {
"200": {
"description": "Candidate resource updated",
"content": {
"application/ld+json": {
"schema": {
"$ref": "#/components/schemas/Candidate.jsonld"
}
},
"text/html": {
"schema": {
"$ref": "#/components/schemas/Candidate"
}
}
},
"links": {}
},
"400": {
"description": "Invalid input"
},
"404": {
"description": "Resource not found"
},
"422": {
"description": "Unprocessable entity"
}
},
"summary": "Updates the Candidate resource.",
"description": "Updates the Candidate resource.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Candidate identifier",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
},
"style": "simple",
"explode": false,
"allowReserved": false
}
],
"requestBody": {
"description": "The updated Candidate resource",
"content": {
"application/merge-patch+json": {
"schema": {
"$ref": "#/components/schemas/Candidate"
}
}
},
"required": true
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"Candidate": {
"type": "object",
"description": "",
"deprecated": false,
"properties": {
"id": {
"readOnly": true,
"type": "string"
},
"email": {
"type": "string"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"linkedinUrl": {
"type": "string"
},
"mobileNumber": {
"type": "string"
},
"phoneNumber": {
"type": "string"
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"updatedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
},
"Candidate.jsonld": {
"type": "object",
"description": "",
"deprecated": false,
"properties": {
"@context": {
"readOnly": true,
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"@vocab": {
"type": "string"
},
"hydra": {
"type": "string",
"enum": [
"http://www.w3.org/ns/hydra/core#"
]
}
},
"required": [
"@vocab",
"hydra"
],
"additionalProperties": true
}
]
},
"@id": {
"readOnly": true,
"type": "string"
},
"@type": {
"readOnly": true,
"type": "string"
},
"id": {
"readOnly": true,
"type": "string"
},
"email": {
"type": "string"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"linkedinUrl": {
"type": "string"
},
"mobileNumber": {
"type": "string"
},
"phoneNumber": {
"type": "string"
},
"createdAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"updatedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
},
"responses": {},
"parameters": {},
"examples": {},
"requestBodies": {},
"headers": {},
"securitySchemes": {}
},
"security": [],
"tags": [],
"webhooks": {}
}
- 主要言語
- TypeScript
- スター
- 376
- フォーク
- 132
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
api-platform/create-client のほかの issue
-
[potential Security Alert] New `test-vue-app` script added in `@api-platform/[email protected]`オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/create-client#396 ·
-
[potential Security Alert] New `test-nuxt-app` script added in `@api-platform/[email protected]`オープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
api-platform/create-client#397 ·
-
[potential Security Alert] New `test-next-app` script added in `@api-platform/[email protected]`オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
api-platform/create-client#395 ·
-
[potential Security Alert] New `test-react-app` script added in `@api-platform/[email protected]`オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/create-client#394 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
api-platform/create-client#393 · コメント 1 件 ·
api-platform/create-client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
github/copilot-sdk#2804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
drizzle-team/drizzle-orm#6418 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
diegosouzapw/OmniRoute#15307 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信