write me a javascript function that parses swagger JSON file and returns all POST endpoints as array of objects with url property and parse the object shape from the #/definitions part and add that as a property named 'obj'
function getPostEndpoints(swagger){ return swagger.paths .filter(p => p.post) .map(p => { return { url: p.path, obj: swagger.definitions[p.post.parameters[0].schema.$ref.replace('#/definitions/', '')] } }) }