openapi: 3.2.0 info: title: Operations Hub Core.turbine Components.receptors API version: 0.1.1 description: '' servers: [] tags: - name: core.turbine-components.receptors paths: /api/core/v1/turbine-components/{blade_id}/receptors: get: operationId: list_blade_receptors summary: List receptors on a single blade parameters: - in: path name: blade_id schema: title: Blade Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReceptorListResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' tags: - core.turbine-components.receptors security: - APIKeyAuth: [] - CookieAuth: [] put: operationId: sync_blade_receptors summary: Sync receptors on a single blade parameters: - in: path name: blade_id schema: title: Blade Id type: integer required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReceptorListResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' tags: - core.turbine-components.receptors requestBody: content: application/json: schema: $ref: '#/components/schemas/ReceptorSyncBody' required: true security: - APIKeyAuth: [] - CookieAuth: [] components: schemas: ReceptorItem: additionalProperties: false description: 'One receptor row in a sync (PUT) body for a single blade. A receptor is a ``TurbineComponent`` with ``component_type`` Receptor or HV Receptor and ``parent_turbine_component`` set to the owning blade. The sync endpoint operates on the receptor children of one blade at a time. Upsert by ``id``: rows with ``id`` set update the matching record; rows without ``id`` create a new one. Existing rows whose ``id`` is omitted from the list are soft-deleted (full-list sync semantics).' properties: id: anyOf: - exclusiveMinimum: 0 type: integer - type: 'null' description: Existing receptor TurbineComponent id when updating; omit for create title: Id name: description: Receptor label (stored in TurbineComponent.serial_number) maxLength: 255 minLength: 1 title: Name type: string radius_from_hub_m: anyOf: - maximum: 200.0 minimum: 0.0 type: number - type: 'null' description: Distance from hub in meters (TurbineComponent.radius) title: Radius From Hub M is_blade_tip: default: false description: True for the single tip-of-blade receptor (TurbineComponent.blade_tip) title: Is Blade Tip type: boolean component_type_id: anyOf: - exclusiveMinimum: 0 type: integer - type: 'null' description: Optional ComponentType id. Must point at a Receptor or HV Receptor row. Defaults to Receptor on create when omitted. title: Component Type Id pair_index: anyOf: - enum: - 1 - 2 type: integer - type: 'null' description: 1 or 2 for paired receptors (turbine model has double_receptors / hv_double_receptors set); NULL for non-paired. The frontend echoes back what GET returned so paired rows round-trip through a full-list PUT; on update by id the value is preserved when omitted. title: Pair Index required: - name title: ReceptorItem type: object ReceptorObject: additionalProperties: false description: Single receptor row in a GET response (includes ``updated_at``). properties: updated_at: description: Last update timestamp format: date-time title: Updated At type: string id: description: Receptor TurbineComponent id title: Id type: integer name: description: Receptor label (serial_number) title: Name type: string radius_from_hub_m: anyOf: - type: number - type: 'null' description: Distance from hub in meters title: Radius From Hub M is_blade_tip: description: True for the tip-of-blade receptor title: Is Blade Tip type: boolean component_type_id: description: ComponentType id — Receptor or HV Receptor title: Component Type Id type: integer pair_index: anyOf: - enum: - 1 - 2 type: integer - type: 'null' description: 1 or 2 for paired receptors (turbine model has double_receptors / hv_double_receptors set); NULL for non-paired. Echo back on PUT to round-trip paired rows. title: Pair Index required: - updated_at - id - name - is_blade_tip - component_type_id title: ReceptorObject type: object ReceptorSyncBody: additionalProperties: false description: PUT body for ``/blades/{id}/receptors`` — replaces the full list. properties: receptors: description: Full desired receptor list for this blade. Rows missing from the list are soft-deleted; matching rows update; new rows (no id) are created with parent_turbine_component_id set to this blade. items: $ref: '#/components/schemas/ReceptorItem' title: Receptors type: array title: ReceptorSyncBody type: object Error: additionalProperties: false description: Error response schema. properties: code: $ref: '#/components/schemas/ErrorCode' message: title: Message type: string required: - code - message title: Error type: object ReceptorListResponse: additionalProperties: false description: 'GET response: ordered receptor list for one blade.' properties: receptors: items: $ref: '#/components/schemas/ReceptorObject' title: Receptors type: array title: ReceptorListResponse type: object ErrorCode: description: Error codes for API errors. enum: - validation - server - auth - unknown - external - generic title: ErrorCode type: string securitySchemes: APIKeyAuth: type: http scheme: bearer CookieAuth: type: apiKey in: cookie name: opshub_prod_sessionid AuthBearer: type: http scheme: bearer