瀏覽代碼

contact form email

master
Florian Eisenmenger 2 年之前
父節點
當前提交
f2605f2d4e
共有 4 個檔案被更改,包括 39 行新增5 行删除
  1. +3
    -4
      README.md
  2. +1
    -1
      export/openapi.json
  3. +33
    -0
      export/openapi.yaml
  4. +2
    -0
      src/ApiResource/ContactApi.php

+ 3
- 4
README.md 查看文件

@@ -98,10 +98,9 @@
- https://api-platform.com/docs/distribution/
- https://api-platform.com/docs/core/extending/

ddev exec bin/console api:openapi:export --yaml >> openapi.yaml
-> export OpenApi spec

(Achtung: Erst die alte OpenApi.yaml löschen!)
Ausführen, um openApi.yaml und openApi.json zu generieren:
- php export/exportApi.php
openApi.yaml und openApi.json in Frontend-Projekt (root) kopieren

# Lexik JWT
- https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/index.html


+ 1
- 1
export/openapi.json
文件差異過大導致無法顯示
查看文件


+ 33
- 0
export/openapi.yaml 查看文件

@@ -1500,6 +1500,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1511,6 +1512,7 @@ components:
- string
- 'null'
posting:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1543,6 +1545,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1554,6 +1557,7 @@ components:
- string
- 'null'
posting:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1600,6 +1604,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1611,6 +1616,7 @@ components:
- string
- 'null'
posting:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1639,6 +1645,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1650,6 +1657,7 @@ components:
- 'null'
format: date-time
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1669,6 +1677,9 @@ components:
- string
- 'null'
email:
format: email
externalDocs:
url: 'https://schema.org/email'
type:
- string
- 'null'
@@ -1709,6 +1720,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1720,6 +1732,7 @@ components:
- 'null'
format: date-time
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1739,6 +1752,9 @@ components:
- string
- 'null'
email:
format: email
externalDocs:
url: 'https://schema.org/email'
type:
- string
- 'null'
@@ -1793,6 +1809,7 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1804,6 +1821,7 @@ components:
- 'null'
format: date-time
image:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -1823,6 +1841,9 @@ components:
- string
- 'null'
email:
format: email
externalDocs:
url: 'https://schema.org/email'
type:
- string
- 'null'
@@ -1949,6 +1970,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2020,6 +2042,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2105,6 +2128,7 @@ components:
- string
- 'null'
logo:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2143,6 +2167,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2154,12 +2179,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2201,6 +2228,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2212,12 +2240,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2273,6 +2303,7 @@ components:
- string
- 'null'
owner:
'owl:maxCardinality': 1
type:
- string
- 'null'
@@ -2284,12 +2315,14 @@ components:
- string
- 'null'
partner:
'owl:maxCardinality': 1
type:
- string
- 'null'
format: iri-reference
example: 'https://example.com/'
contact:
'owl:maxCardinality': 1
type:
- string
- 'null'


+ 2
- 0
src/ApiResource/ContactApi.php 查看文件

@@ -21,6 +21,7 @@ use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Patch;
use ApiPlatform\Metadata\Post;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\NotBlank;

#[ApiResource(
@@ -71,6 +72,7 @@ class ContactApi

public ?string $phone = null;

#[Email]
public ?string $email = null;

/**


Loading…
取消
儲存