(This is my first stack overflow post so go easy on me, haha)
I'm using:
-OpenApi (v3)
-L5-Swagger (wrapper of swagger-php & swagger-ui)
I'm using annotations to generate an OpenAPI spec. The spec is being generated without errors from the console. However, in each property for every model there's an additional property being added once it generates.
I've tried:
1. re-writing the model,
2. rewriting the properties in different ways
One of my models & the "id" property:
/**
* Class ActionPlan
*
* @OA\Schema(
* description="Action Plans",
* title="Action Plan Schema",
* required={
* "id",
* "name",
* "organization_id",
* "assessment_period_id",
* "completed",
* "created_by",
* "updated_by"
* },
* )
*
* @OA\Property(
* property="id",
* type="integer",
* format="int32",
* description="Action Plan ID"
* )
Here's what is being generated:
"ActionPlan": {
"title": "Action Plan Schema",
"description": "Action Plans",
"required": [
"id",
"name",
"organization_id",
"assessment_period_id",
"completed",
"created_by",
"updated_by"
],
"properties": {
"id": {
"schema": "ActionPlan",
"description": "Action Plan ID",
"type": "integer",
"format": "int32"
},
What am I doing that there's a "schema" property being generated?
When I put the spec file into Swagger editor, it says that ActionPlan.properties.id should NOT have additional properties. Additional property: schema.
I'm just wondering what's happening to make create "schema" property.
Thanks in advance!