func (t *ResourceType) ForEachExtension(callback func(extension *Schema, required bool) error) error {
	for _, ext := range t.extensions {
		if err := callback(ext, t.required[ext.id]); err != nil {
			return err
		}
	}
	return nil
}
ForEachExtension iterates through all schema extensions and invoke the callback.
package spec
import (
	"encoding/json"
	"github.com/imulab/go-scim/pkg/v2/annotation"
	"github.com/imulab/go-scim/pkg/v2/spec/internal"
)
type ResourceType struct {
	id          string
	name        string
	description string
	endpoint    string
	schema      *Schema
	extensions  []*Schema
	required    map[string]bool  
}
func (t *ResourceType) ID() string {
	return t.id
}
func (t *ResourceType) Name() string {
	return t.name
}
func (t *ResourceType) Description() string {
	return t.description
}
func (t *ResourceType) Endpoint() string {
	return t.endpoint
}
func (t *ResourceType) Schema() *Schema {
	return t.schema
}