The Open Source Static Analyser PMD is now supporting not only Apex but also rules on arbitrary XML metadata. Using flexible XPath expressions that verify the structure and attributes of XML.
I am thinking of writing a tool that helps people to write such rules more easily and need a way to get the structure/schema for a given metadata type. In the old MDAPI and the new Source format.
Is there an API where I can get the Schema, or a website with XML Schemas that get updated by Salesforce?
The only idea I can think of is:
- Apex-download the Metadata WSDL generated from the current org at https://serverinstance.salesforce.com/services/wsdl/metadata
- Parse its elements