You are viewing an old version of this page. View the current version.
In this example, the Ed-Fi Extensions needed by the organization are for a student transcript. The steps below are a continuation of the How-To articles described in the Ed-Fi Data Standard v2.2 documentation, XML Schema - Extensions Framework Guide.
The steps can be summarized as:
Detail on each step follows.
Step 1. Author Ed-Fi Core Schema Extensions
Create an Extension to the Ed-Fi Core Schema, called EXTENSION-Ed-Fi-Core.xsd, and place it in the C:\Ed-Fi-ODS-Implementation\Extensions\Schemas folder.
More information about how the Ed-Fi Core schema Extensions are created can be found in the following series of How-To articles in the Ed-Fi Data Standard v2.2 documentation:
- How To: Extend the Ed-Fi XML Schema (Part 1)
- How To: Extend the Ed-Fi XML Schema (Part 2)
- How To: Extend the Ed-Fi XML Schema (Part 3)
- How To: Extend the Ed-Fi XML Schema (Part 4)
The resulting XML Schema file is shown below. It is important to note that core schema Extension file must be able to resolve the reference to the Ed-Fi Core Schema file (i.e., in the
Step 2. Author a Custom Interchange Schema
Create a custom interchange file, called EXTENSION-Interchange-HSGeneratedStudentTranscript.xsd, and place it in the C:\Ed-Fi-ODS-Implementation\Extensions\Schemas folder. More information about how this file is created can be found in How To: Extend the Ed-Fi XML Schema (Part 5).
The resulting custom interchange schema file is found below. It is important to note that the
schemaLocation should be a valid reference the schema file that contains the Extension definition (i.e., the EXTENSION-Ed-Fi-Core.xsd file created in the previous step).
Step 3. Author Database Schema Extensions
Create an Extension SQL script called 0001-Extensions.sql and place it in the C:\Ed-Fi-ODS-Implementation\Database\Structure\EdFi folder. This script defines the database schema for the Extension.
Step 4. Author API Metadata Extensions
Create an Extension API metadata file called DomainMetadata-Extension.xml and place it in the C:\Ed-Fi-ODS-Implementation\Extensions\Metadata folder. This file will define the new types and domain entities, and ensure the code generation process will process the entity.
Step 5. Author Interchange Order Metadata Extensions
Create an Extension API metadata file called InterchangeOrderMetadata-Extension.xml and place it in the C:\Ed-Fi-ODS-Implementation\Extensions\Metadata folder. This file defines the position of the new custom interchange in the load order, ensuring that the interchange loads correctly.
Step 6. Configure Security
The Ed-Fi ODS / API is secure by default. One implication of this design principle is that new entities and elements may not be accessed until an authorization strategy is applied. This prevents accidental release of confidential information, but does require active steps on the part of system developers to enable access to Extensions.
PostSecondaryOrganization has no relationship to people or education organizations and therefore has no authorization strategy that can be applied to it. In effect, it is a standalone table and will need an authorization strategy of "NoFurtherAuthorizationRequired" for API requests to be made against it. If security is desired, another authorization strategy could be implemented to handle this entity.
To enable NoFurtherAuthorizationRequired, first create a security SQL script called 0001-PostSecondaryOrganization_No_Further_Auth_Required.sql and place it in the C:\Ed-Fi-ODS-Implementation\Database\Data\EdFiSecurity folder (Create 'EdFiSecurity' folder if it does not exist). Copy the contents of the following SQL DML script into the newly created file and save.
Step 7. Run Code Generation and Verify Changes
Re-run the code generation steps outlined in the Getting Started Guide (i.e., from a PowerShell prompt run the
Initialize-PowershellForDevelopment.ps script, followed by the
initdev command). Then run the application and view the Ed-Fi ODS / API using Swagger. The following new API resource should be visible:
- No labels